User:KCCreations/global.js

/*Refresh (checkmark)*/ var ajaxPages = ["Blog:Recent_posts", "Special:WikiActivity", "Special:RecentChanges", "Special:Log", "Special:Contributions", "Special:NewFiles"]; window.ajaxRefresh = 30000;

//Quick create user page config templateLanguages = ['es', 'nl']; qtUserPageTemplate = '';

var qtEnableUserPageOverwrite = true;

//QuickToolsv2 in toolbar var QuickToolsAdvancedtop = false;

//AjaxBatchDelete batchDeleteDelay = 1000;

//MassNullEdit nullEditDelay = 1000; nullEditUserButton = true;

//MassProtect massProtectDelay = 1000;

//MassRename if (mw.config.get("wgUserGroups").indexOf('sysop') > -1) { massRenameDelay = 1000; massRenameSummary = 'Fixing names'; importScriptPage('MediaWiki:MassRename/code.js', 'dev'); };

//MassUserRights, but only on wikis where I am a bureaucrat if (mw.config.get("wgUserGroups").indexOf('bureaucrat') > -1) { massUserRightsDelay = 1000; importScriptPage('MediaWiki:MassUserRights/code.js', 'dev'); };

// Script imports window.importArticles( {   type: 'script',    articles: [      'u:admintools:MediaWiki:Common.js/extraRollbacks.js',      'u:dev:MediaWiki:AjaxBatchDelete/code.2.js',      'u:dev:MediaWiki:AjaxPatrol/code.js',      'u:dev:MediaWiki:AjaxRC/code.js',      'u:dev:MediaWiki:AllPagesHideRedirect/code.js',      'u:dev:MediaWiki:AnchoredRollback/code.js',      'u:dev:MediaWiki:BackToTopButton/code.js',      'u:dev:MediaWiki:CacheCheck/code.js',      'u:dev:MediaWiki:CategoryRenameAuto-update/code.js',      'u:dev:MediaWiki:ChatTimestamps/code.js',      'u:dev:MediaWiki:ContribsLink/code.js',      'u:dev:MediaWiki:DisplayClock/code.js',      'u:dev:MediaWiki:EditIntroButton/code.js',      "u:dev:MediaWiki:FileUsageAuto-update/code.js",      'u:dev:MediaWiki:LastEdited/code.js',      'u:dev:MediaWiki:MassNullEdit/code.js',      'u:dev:MediaWiki:MassProtect/code.js',      'u:dev:MediaWiki:PageRenameAuto-update/code.js', 'u:dev:MediaWiki:PurgeButton/code.js', 'u:dev:MediaWiki:QuickCreateUserPage/code.js', 'u:dev:MediaWiki:QuickToolsv2/code.js', 'u:dev:MediaWiki:RedirectManagement/code.js', 'u:dev:MediaWiki:RevealAnonIP/usercode.js', 'u:dev:MediaWiki:View_Source/code.js', 'u:dev:MediaWiki:WallGreetingButton/code.js', 'u:dev:MediaWiki:WHAM/code.2.js', 'w:c:kccreations:User:KCCreations/QuickTitle.js' ] });

// BEGIN BotoneraPopups importScriptURI('http://dev.wikia.com/wiki/BotoneraPopups/Code/en.js?action=raw&ctype=text/javascript&templates=expand'); importStylesheetPage('BotoneraPopups/code.css', 'dev'); // END

/* Make Visual Editor links load the regular editor instead */ if ($.getUrlVar('veaction') == 'edit') location.replace(document.URL.replace('veaction','action'));

//Editcount button in the dropdown $(function { $('Edit count').insertBefore('.AccountNavigation .subnav li:first'); });

//Idk what this does, but Mime uses it, so... $(document).ready(function { if (mw.config.get("wgAction") !== "edit" && mw.config.get("wgAction") !== "submit") {    globalnavcolor = setInterval(function{ $('.global-navigation-container').css('background-color', $('.navbackground').css('background-color')); clearInterval(globalnavcolor); },1000); } });

// ******************************************************** // Remove AutoSummary During Deletion - Created by Josephyr // ******************************************************** $(function {    // Clears the delete additional 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 = "";        }    } });

/* Producer quick reference modals. :3 */ /////////////////////////////////////////////////////////// //Zedd function zeddModal { $.showCustomModal( 'Zedd', '\n\n* Real name: Anton Zaslavski (Wikipedia is a bunch of bakas; Igorevich is NOT his middle name) }; $('.toolbar .tools').append($(' Zedd'));
 * Date of birth: 2 September 1989 (age 26)
 * Place of birth: Saratov, Russia
 * Facebook: Zedd
 * Instagram: @zedd
 * Twitter: @Zedd
 * YouTube: ZEDDVEVO (main), <a href="https://www.youtube.com/user/ZeddVideos">ZeddVideos</a> (alt)
 * Official site: <a href="https://www.zedd.net/">zedd.net</a>', { width:500 } );

//Madeon function madeonModal { $.showCustomModal( 'Madeon', '<img src="http://djmag.com/sites/default/files/storyimages/MadeonExcluisvePortrait1_AndrewRauner_3000px.jpg" width="500">\n\n* Real name: Hugo Pierre Leclercq }; $('.toolbar .tools').append($(' <a href="javascript:madeonModal">Madeon</a></li>')); ///////////////////////////////////////////////////////////
 * Date of birth: 30 May 1994 (age 21)
 * Place of birth: Nantes, France
 * Facebook: <a href="https://www.facebook.com/itsmadeon/timeline?ref=page_internal">itsmadeon</a>
 * Instagram: <a href="https://instagram.com/madeon/">@madeon</a>
 * Twitter: <a href="https://twitter.com/madeon">@madeon</a>
 * YouTube: <a href="https://www.youtube.com/user/MadeonVEVO">MadeonVEVO</a>
 * Official site: <a href="http://www.madeon.fr/">madeon.fr</a>', { width:500 } );

//Logs link in the "On the Wiki" part of the local nav $(".subnav-2.accent.firstChild").append("<a class='subnav-2a' href='/Special:Log'>Logs</a></li>");

//Highlight whitespace characters in diffs when they're the only thing that was changed //Written by Bobogoobo if (window.location.href.indexOf('diff=') !== -1) { $('.diffchange-inline').each(function {   if (!(new RegExp('\\S+').test($(this).text))) {      $(this).css('background-color', 'red');    }  }); }

//In the event of another security breach, press this button to disable all personal and site-wide code $(function { if (!document.getElementById('ca-skins')) {    if (skin === 'oasis' || skin === 'wikia') {      $('<a href="/index.php?title=' + encodeURIComponent(wgPageName) + '&usesitejs=0&usesitecss=0&useusercss=0&useuserjs=0">Turn off all Wikia codes</a></li>').appendTo('.AccountNavigation .user-menu');    } else {      $('<a href="/index.php?title=' + encodeURIComponent(wgPageName) + '&usesitejs=0&usesitecss=0&useusercss=0&useuserjs=0">Turn off all Wikia codes</a></li>').appendTo('.toolbar .tools #my-tools-menu');    }   } });