User:Callofduty4/OldFilePages.js

function RevertToOldFilePages { FixPageModules; AddWhatLinksHere; }

function FixPageModules { $('.more-info-wrapper').css('display', 'block'); $('.SeeMore').remove; $('.page-listings').remove; }

function AddWhatLinksHere { Pages = []; PageTitle = mw.config.get("wgPageName"); Site = mw.config.get("wgServer"); $.getJSON(Site + '/api.php?action=query&list=imageusage&iutitle=' + PageTitle + '&iulimit=max&format=json', function(data) { 		$.each(data.query.imageusage, function(index, value) { Page = value.title; Pages.push('' + Page + ''); });		ListOfPages = Pages.join('');			html = ' File usage ' + ListOfPages + '';		$('.more-info-wrapper').append(html);		console.log(Pages);	}); }

$(document).ready(function {	RevertToOldFilePages; });