User:Klap Trap/global.js

//mw.loader.load('//dev.fandom.com/index.php?title=MediaWiki:SkinSwitchButton/code.js&action=raw&ctype=text/javascript'); ///////////////////////////////////////////////////////////////////////// /***********************************************************************/ /************************ Import Configurations ************************/ /***********************************************************************/ ///////////////////////////////////////////////////////////////////////// /* Mass Effect Configs */ batchDeleteDelay = 250; massProtectDelay = 500; //massRedirectDelay = 500; massRenameDelay = 500; massRenameSummary = "Renaming Pages"; nullEditDelay = 250; WHAMDelay = 500; //End MEC*/ ///////////////////////////////////////////////////////////////////////// /***********************************************************************/ /******************************* Imports *******************************/ /***********************************************************************/ ///////////////////////////////////////////////////////////////////////// importArticles({   type: 'script',    articles: [        'u:dev:MediaWiki:AjaxBatchDelete/code.js',        //'u:dev:MediaWiki:AutoEditPages/code.js',        //'u:dev:MediaWiki:CleanWantedFiles/code.js',        //'u:dev:MediaWiki:Linksweeper/code.js',        //'u:dev:MediaWiki:MassCategorization/code.js',        'u:dev:MediaWiki:MassEdit/code.js',        'u:dev:MediaWiki:MassNullEdit/code.js',        'u:dev:MediaWiki:MassProtect/code.js',        //'u:dev:MediaWiki:MassRedirect/code.1.js',        'u:dev:MediaWiki:MassRename/code.js',        'u:dev:MediaWiki:MassRenameRevert/code.js',        'u:dev:MediaWiki:WHAM/code.2.js',        'u:dev:MediaWiki:MassCategorization/code.js',        ] });//End Imports*/ /* Auto-refreshing recent changes */ /*ajaxPages = ["Spezial:WikiActivity","Spezial:Letzte_Änderungen","Spezial:Beobachtungsliste","Spezial:Logbuch","Spezial:Beiträge"]; AjaxRCRefreshText = 'Aktualisierung'; AjaxRCRefreshHoverText = 'Aktualisiert die Seite automatisch'; importScriptPage('MediaWiki:AjaxRC/code.js', 'dev');*/ /* Account Age */ importArticles({   type: "script",    articles: [        "u:dev:MediaWiki:UserAccountAge/code2.js"    ] }); /*Discussions Feed */ importArticles({   type: 'script',    articles: [        'u:dev:MediaWiki:MediaWiki:DiscussionsFeed.js',    ] }); /* AwesomeSearch */ var searchForm = document.getElementById("searchForm"); var searchInput = document.getElementById("searchInput"); if (searchForm && searchInput) { searchForm.addEventListener ("submit", function(event) {   "use strict";    if (searchInput.value.indexOf(":") != -1) {      event.preventDefault;      window.location = '/wiki/' + encodeURI(searchInput.value);    }  }); }

importArticles({   type: 'script',    articles: [        'u:dev:MediaWiki:WikiActivity.js',    ] });

$(function {   mw.hook('dev.ct').add(function(addButtons) { addButtons([     {        click: function {          var api = new mw.Api;          api.postWithToken('csrf', { action: 'options', optionname: 'editortype', optionvalue: 4 })            .then(function { window.location.reload; })       },        icon: 'gear',        placement: 'page-tools-left',        position: -1,        text: 'Set source editor in your preferences'      }    ]); }); importArticles({ type: 'script', articles: [ 'u:dev:MediaWiki:CustomTools.js' ] }); });