User:Callofduty4/OldFilePages.js

/* This is not to be enabled wiki-wide */

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'); html = ' File usage  '; $('.more-info-wrapper').append(html); $.getJSON('/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 + ''); });	})	.done(function { 		ListOfPages = Pages.join('');			html = ' File usage ' + ListOfPages + '';		$('.TransclusionsLoading').remove;		$('.more-info-wrapper').append(html);	}); }

$(document).ready(function {	Namespace = mw.config.get('wgCanonicalNamespace');	if (Namespace == 'File') {		RevertToOldFilePages;	} });