User:RisenPhoenix/global.js

//purge button config PurgeButtonText = 'Purge';

//messageblock config var MessageBlock = { title : 'Blockage', message : 'You have been blocked from editing for a period of $2 for $1. Please review the site policy during this time. If you believe this was done in error, please contact an administrator. ', autocheck : true };

mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "http://images.wikia.com/central/images/c/c8/Button_redirect.png", "speedTip": "Redirect", "tagOpen": "#REDIRECT ",		"tagClose": "", "sampleText": "Redirect" };

//last edited config window.lastEdited = { avatar: true, size: false, diff: true, comment: true, time: true };

//cache check config cacheSkip = []; cacheSkipLimit = 1000;

//quick create user page config var qtUserPageTemplate = '';

var qtEnableUserPageOverwrite = true;

//ajax rc config window.ajaxPages = ["Special:RecentChanges","Special:Watchlist","Special:Log","Special:Contributions"];

//batch delete config batchDeleteDelay = 1000;

//wham config WHAMDelay = 1000;

if (wgDBname !== 'admintools') { // Script imports window.importArticles( {   type: 'script',    articles: [      'w:dev:QuickCreateUserPage/code.js',       'u:dev:LastEdited/code.js',      'u:dev:View_Source/code.js',      'u:dev:CacheCheck/code.js',      "w:c:dev:RevealAnonIP/usercode.js",      'u:dev:PurgeButton/code.js',      'u:dev:WHAM/code.2.js',      'u:dev:AjaxUndo/code.js',      'u:dev:QQX/code.js',      'u:dev:ViewRemoved/code.js',                            'u:dev:RedirectManagement/code.js',      'u:dev:CleanWantedFiles/code.js',      'u:dev:AjaxBatchDelete/code.2.js',      'u:dev:MessageBlock/code.js',      'w:c:community:User:Ozuzanna/nuke.js',      'u:dev:NoImageLightbox/code.js',      'u:admintools:MediaWiki:Common.js/powerUser.js',       'u:admintools:MediaWiki:Common.js/sitenotice.js',      'u:admintools:MediaWiki:Common.js/extraRollbacks.js',      'u:admintools:MediaWiki:Common.js/ajaxRollback.js',      'u:dev:ReplyBottom/code.js', ] } ); }

//stuff made by @452

//Restore ogg_player info link click - Wikia has been informed of this problem, and the cause. $(".ogg_player a.image").each(function{ $(this).unbind("click").bind("click", function { window.open($(this).prop("href"));  }); })

// stuff I found in @Ozuzanna's global.js

var c = mw.config.get( [   'wgAction',    'wgArticlePath',    'wgCanonicalNamespace',    'wgCanonicalSpecialPageName',    'wgDBname',    'wgNamespaceNumber',    'wgPageName',    'wgUserGroups',    'wgSiteName',    'skin',    'wgTitle' ] ), articlePath = c.wgArticlePath.slice(0,-2), array = [], escapedPage = encodeURIComponent(c.wgPageName);
 * (function($, mw) {

switch (c.wgCanonicalSpecialPageName) { /* Add IP lookup on anon contribs */ case "Contributions": if ($('#anontalktext').length && c.wgTitle.split('.').length == 4) $('.masthead-info h2').html('(lookup)'); break; } /* Always go to IP contributions, not userpage */ if (c.wgNamespaceNumber == 2 && c.wgTitle.split('.').length == 4) location.replace(articlePath + 'Special:Contributions/' + c.wgTitle);

/* Show abuse log entries in Special:Log/newusers */ if ("Special:Log/newusers".indexOf(c.wgPageName) !== -1) { $('.mw-logline-newusers').each(function {   $(this).find('.mw-usertoollinks').find('a:last').after(' | abuse');  }); }

/* Create toolbar links */ function addToolbarTool(param,text) { if ($('.toolbar > .tools').length) { $('.toolbar > .tools > li:last').after(     $('').append('' + text + '')    ); } } addToolbarTool("&useskin=monobook","Mono"); addToolbarTool("&useskin=wikiamobile","Mobi"); addToolbarTool("&allowuserjs=0","No User JS"); addToolbarTool("&allowusercss=0","No User CSS"); addToolbarTool("&usesitejs=0","No Site JS"); addToolbarTool("&usesitecss=0","No Site CSS"); /* Auto-submit bugged pages for deletion */ 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); } // quick prefix search if (mw.config.get('wgNamespaceNumber') !== -1) { var prefixlink = 'Prefix search'; if (mw.config.get('skin') === 'oasis') { $('#my-tools-menu').prepend(prefixlink); } else if (mw.config.get('skin') === 'monobook') { $('#p-tb > .pBody > ul').append(prefixlink); } } //end if (mw.config.get('wgPageName') == "Special:Torus") { importScriptURI('http://monchbox.wikia.com/wiki/User:Monchoman45/monobook.js?action=raw&ctype=text/javascript&templates=expand'); $('.global-navigation').remove; } }) (this.jQuery, this.mediaWiki);

/* Removing content from auto-adding to additional reason when deleting (probably written by Josephyr) */ $(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');        }    }); }