User:JPhil2.0/global.js

// 16:46, November 24, 2013 (UTC) // ',            '',            'mw-editbutton-code' );   }    var globalJSArticles;    try {        globalJSArticles = JSON.parse(sessionStorage.getItem('globalJSArticles'));    } catch (e) {        globalJSArticles = null;    }    var qtUserPageTemplate = '',        qtEnableUserPageOverwrite = true;    if (!$.isArray(globalJSArticles)) {        globalJSArticles = [                '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:AjaxRC/beta.js',                'w:c:dev:AjaxUndo/code.js',                'w:c:dev:QuickCreateUserPage/code.js',                'w:c:dev:EditIntroButton/code.js',                'w:c:dev:NoImageLightbox/code.js',                'w:c:dev:PortableCSSPad/code.js'        ];    }    console.log("globalJSArticles =", globalJSArticles);    console.log( "\nglobalJSArticles.splice(4, 1); sessionStorage.setItem(\"globalJSArticles\", JSON.stringify(globalJSArticles)); window.location.reload;\n\nsessionStorage.removeItem(\"globalJSArticles\"); window.location.reload;\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');       // Ugly hack to make search work        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([]); }                   });                }            });        });    } });

/* Workaround for incorrect values of wgAction if (skin == "oasis" || skin == "wikia") { var locParam = location.href.substr(location.href.indexOf("action=")+7).split("&"); wgAction = (location.href.indexOf("action=") == -1) ? "view" : locParam[0]; } // Skin Switch Button for monobook to oasis and vice versa $( function {	if ( !document.getElementById( 'ca-skins' ) ) {		if ( skin === 'oasis' || skin === 'wikia' ) {			$( 'MB' ).appendTo( '#AccountNavigation' ); $( 'WM' ).appendTo( '#AccountNavigation' );		} else {			$( 'Oasis' ).appendTo( '#p-cactions > .pBody > ul' ); $( 'Mobile' ).appendTo( '#p-cactions > .pBody > ul' );		} 	} } ); $(function { $('<a href="http://community.wikia.com/wiki/User:JPhil2.0/global.js">Global.js</a></li>').insertBefore('.AccountNavigation .subnav li:first'); }); $(function { $('<a href="http://community.wikia.com/wiki/User:JPhil2.0/global.css">Global.css</a></li>').insertBefore('.AccountNavigation .subnav li:first'); });

$(function { $('<a href="/wiki/Special:SpecialPages">Special Pages</a></li>').insertBefore('.AccountNavigation .subnav li:first'); }); $(function { $('<a href="/wiki/Special:Leaderboard">Leaderboard</a></li>').insertBefore('.AccountNavigation .subnav li:first'); }); $(function { $('<a href="/wiki/User blog:JPhil2.0">Blog</a></li>').insertBefore('.AccountNavigation .subnav li:first'); });

/* ================  Other imports ================ */

importArticles({   type: "script",    articles: [        "w:dev:FixWantedFiles/code.js",        "w:dev:Countdown/code.js",        "w:dev:SpoilerAlert/code.js",        "MediaWiki:Functions.js",        "w:dev:ListFiles/code.js",        "w:dev:ShowHide/code.js",        "w:dev:EditIntroButton/code.js",        "w:dev:DupImageList/code.js",        "w:dev:RevealAnonIP/code.js",        "u:dev:AjaxRC/code.js",        "w:dev:Category_Sorter/code.js",        "w:dev:Standard_Edit_Summary/code.js",        "MediaWiki:Common.js/forumnote.js",        "w:dev:TopEditors/code.js"        /* "u:dev:Code/code.js"  No thank you, ugly. */    ] });

importArticle({type:'script', article:'w:c:dev:DisplayClock/code.js'});

importScriptPage('BackToTopButton/code.js', 'dev');

importArticles({   type: 'script',    articles: [        'u:dev:Message/code.js'    ] });

var SocialMediaButtons = { position: "top", colorScheme: "dark", buttonSize: "default" }; importScriptPage('SocialIcons/code.js','dev');

importArticles({   type: 'script',    articles: [        'u:dev:Message/code.js'    ] });

importScriptPage('User:Monchoman45/ChatHacks.js', 'c'); //