User:Rangerbot/global.js

PurgeButtonText = 'Purge';

var qtEnableUserPageOverwrite = true; cacheSkip = []; cacheSkipLimit = 1000;

// Script imports window.importArticles( {   type: 'script',    articles: [      'u:dev:Mediawiki:MassRenameRevert/code.js',      'u:dev:Mediawiki:AutoEditPages/code.js',      'u:dev:Mediawiki:MassNullEdit/code.js',      'u:dev:Mediawiki:MassCategorization/code.js',      "u:dev:Mediawiki:FileUsageAuto-update/code.js",      "u:dev:Mediawiki:WHAM/code.2.js",      "u:dev:Mediawiki:CategoryRenameAuto-update/code.js",      "u:dev:Mediawiki:PageRenameAuto-update/code.js",      'u:dev:Mediawiki:PurgeButton/code.js',      "u:dev:Mediawiki:ListFiles/code.js",      'u:dev:Mediawiki:CacheCheck/code.js',      'u:dev:Mediawiki:AjaxBatchDelete/code.js',      'w:dev:Mediawiki:QuickCreateUserPage/code.js',      "w:c:dev:Mediawiki:RevealAnonIP/usercode.js",      'u:admintools:MediaWiki:Common.js/extraRollbacks.js',      'u:admintools:MediaWiki:Common.js/ajaxRollback.js',      'u:dev:Mediawiki:RedirectManagement/code.js', 'u:dev:Mediawiki:CleanWantedFiles/code.js', 'w:c:community:User:Ozuzanna/nuke.js', ] } );

$(function {   // Clears the delete reason box if it's an autosummary    if (wgAction && wgAction === "delete") {        var deleteBox = document.getElementsByName("wpReason")[0];        if (deleteBox && deleteBox.value.search("content was") === 0) {            deleteBox.value = "";        }    } }); /* Stuff written by @Bobogoobo */ // Add "infinite" value to expiry dropdowns (another thing that should be built-in) $('#mw-input-wpExpiry option:last').before(   $(' ', { 'value':'infinite', 'text':'infinite' }) ); //Highlight whitespace characters in diffs when they're the only thing in the change //Winner of most conspicuous missing feature for five consecutive years if (window.location.href.indexOf('diff=') !== -1) { $('.diffchange-inline').each(function {       if (!(new RegExp('\\S+').test($(this).text))) {            $(this).css('background-color', 'red');        }    }); } //end $('Lockdown').appendTo('.WikiHeader .buttons .contribute .WikiaMenuElement');

/* Auto-submit bugged pages for deletion by Oz */ if (c.wgAction == "delete" && $('#ca-edit').text.trim == "Create") $('#mw-img-deleteconfirm,#deleteconfirm').submit; // by @OneTwoThreeFall // disable redirect links $('.mw-redirect, .allpagesredirect > a').each(function {  var link = new mw.Uri(this.href);  link.extend({ redirect: 'no' }); $(this).attr('href', link.toString); }); // don't leave redirect when moving files if (mw.config.get('wgCanonicalSpecialPageName') === 'Movepage' &&   mw.config.get('wgRelevantPageName').indexOf(mw.config.get("wgFormattedNamespaces")[6] + ':') === 0) { $('#wpLeaveRedirect').prop('checked', false); }