User:UltimateSupreme/global.js

// 18:24, October 17, 2013 (UTC)

// Make source mode default $(function {    "use strict";    $(window.document).on('click.DefaultSourceMode', function (ev) { if (           mw.config.get('wgAction') === 'view' &&            ev.target.tagName === 'A' &&            /[\?&]action=edit(?:[&#]|$)/.test(ev.target.href)) { ev.target.href += '&useeditor=source'; }   }); });

var globalJSArticles;

try { globalJSArticles = JSON.parse(sessionStorage.getItem('globalJSArticles')); } catch (e) { globalJSArticles = null; }

var qtUserPageTemplate = '', qtEnableUserPageOverwrite = true;

if (!$.isArray(globalJSArticles)) { globalJSArticles = [ 'w:c:wikimarks:Client.js', 'w:c:dev:User:UltimateSupreme/accountnav.js', 'w:c:dev:UnsafeScripts/code.js', 'w:c:dev:TabKeyInserter/code.js', 'w:c:dev:AntiUnicruft/code.js', 'w:c:dev:AjaxUndo/code.js', 'w:c:dev:QuickCreateUserPage/code.js', 'w:c:dev:AjaxBatchDelete/code.js', 'w:c:dev:EditIntroButton/code.js', 'w:c:dev:NoImageLightbox/code.js', 'w:c:dev:SkinSwitchButton/code.js', 'w:c:dev:User:UltimateSupreme/FileRenamer.js', 'w:c:dev:PortableCSSPad/code.js' ]; }

console.log(   '\nglobalJSArticles.splice(4, 1); sessionStorage.setItem(\'globalJSArticles\', JSON.stringify(globalJSArticles));\n');

importArticles({   type: 'script',    articles: globalJSArticles });

if (mw.config.get('skin') === 'monobook') { mw.loader.load(       '//commons.wikimedia.org/w/index.php?title=MediaWiki:JSValidator.js&action=raw&ctype=text/javascript');

mw.loader.load(       'https://raw.github.com/Krinkle/mw-gadgets-jsUpdater/master/src/jsUpdater.js');

mw.loader.using('jquery.ui.autocomplete', function {        $('#searchInput').autocomplete({ minLength: 2, source: function (request, response) { $.getJSON(                   mw.util.wikiScript('api'), {                    format: 'json',                    action: 'opensearch',                    search: request.term                }, function (arr) {                    if (arr && arr.length > 1) {                        response(arr[1]);                    } else {                        response([]);                    }                }); }       });    }); }