User:Cblair91/wikia.js/brokenRedirects.js

dil = new Array; function findBrokenRedirects { indicator = stylepath + '/common/progress-wheel.gif'; output = ""; url = "/api.php?action=query&list=querypage&qppage=BrokenRedirects&qplimit=500&format=json"; if(!($('#brokenRedirectsProgress').length)) $("#mw-brokenRedirects").prepend('  '); $.getJSON(url, function(data) {		if(data.query) {			pages = data.query.querypages.results;			for(title in pages) {				dils = "," + dil.join;				output += " " + pages.title + " \n\n";			}			$("#mw-brokenRedirects").append(output);		}	} ); } $(function {	if($("#mw-brokenRedirects").length)		findBrokenRedirects;	else		$('#brokenRedirectsProgress').hide; });