User:Cblair91/wikia.js/articlecategory.js

dil = new Array; function findcn(gf) { indicator = stylepath + '/common/progress-wheel.gif'; output = "{| class=wikitable\n!Category\n!Length"; url = "/api.php?action=query&list=allcategories&aclimit=5000&format=json"; if (!($('#dupImagesProgress').length)) { $("#mw-cn").prepend('  '); }	if ( gf ) { url += "&acfrom=" + gf; }	$.getJSON( url, function (data) {		if (data.query) {			pages = data.query.allcategories;			for ( page in pages ) {				dils = "," + dil.join;				if (dils.indexOf("," + page.*) == -1) {					output += "\n|-\n|" + page.* + "\n|" + page.size;				}			}			$("#mw-cn").append(output);			if (data["query-continue"]) setTimeout("findcn('" + encodeURIComponent(data["query-continue"].allcategories.acfrom).replace(/'/g, "%27") + "');", 100);		}	} ); } $( function {	if ( $("#mw-cn").length ) {		findcn;	} else {		$('#cnProgress').hide;	} } );