User:IStoleThePies/global.js

$(document).ready(function {   dil = new Array; function findDupImages(gf) { output = ""; url = "/api.php?action=query&generator=allimages&prop=duplicatefiles&gailimit=500&format=json"; if (gf) url += "&gaifrom=" + gf; $.getJSON(url,function (data) { if (data.query) { pages = data.query.pages; for (pageID in pages) { dils = ","+dil.join; if (dils.indexOf(","+pages[pageID].title) == -1 && pages[pageID].title.indexOf("File::") == -1 && pages[pageID].duplicatefiles) { output += " "+pages[pageID].title+" \n\n"; for (x=0;xFile:"+pages[pageID].duplicatefiles[x].name+"\n"; dil.push("File:"+pages[pageID].duplicatefiles[x].name.replace(/_/g," ")); } output += "\n\n" } } $("#mw-dupimages").append(output); if (data["query-continue"]) setTimeout("findDupImages('"+data["query-continue"].allimages.gaifrom+"');",5000); } }); } $(function { if ($("#mw-dupimages").length) findDupImages; });    window.ajaxPages = ["Special:RecentChanges","Special:Watchlist","Special:Log","Special:Contributions"];    importScriptPage('AjaxRC/code.js', 'dev');    importScriptPage('ViewRemoved/code.js', 'dev');    importScriptPage('InactiveUsers/code.js', 'dev');    importArticles({ type: 'script', articles: [ // ...           'w:c:dev:SignatureCheck/code.js', // ...       ]    });    importScriptPage("CategoryRenameAuto-update/code.js", "dev");    importScriptPage('User:Monchoman45/ChatHacks.js', 'c');    function UserContribsMenuItem {        var preferences = $('#globalNavigation').children.first.children.eq(2).children.last.children.first.children.eq(2).html;        $('#globalNavigation').children.first.children.eq(2).children.last.children.first.children.eq(3).html(preferences);        $('#globalNavigation').children.first.children.eq(2).children.last.children.first.children.eq(2).html('My Contributions');        /*$('ul.AccountNavigation li:first-child ul.subnav li:first-child').after('My contributions'); $('ul.AccountNavigation li:last-child ul.subnav li:last-child').remove; $('ul.AccountNavigation li:last-child ul.subnav li:last-child').replaceWith('Log out</a></li>');*/ }   UserContribsMenuItem; importArticles({   type: 'script',    articles: [        // ...        'u:kocka:MediaWiki:Emoticons.js',        // ...    ]    }); });