User:JPhil2.0/global.js

// Wiki Activity to Recent Changes if (mw.config.get('skin') === 'oasis') { $(function {       $("a[data-canonical='wikiactivity']").attr('href', '/wiki/Special:RecentChanges').text('Recent Changes');        if (mw.config.get('wgCityId') == 177) {            $("a[data-canonical='chat']").click(function (event) { event.preventDefault; });       }    }); }

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

// Skin Switch Button for monobook to oasis and vice versa $( function {	if ( !document.getElementById( 'ca-skins' ) ) {		if ( skin === 'oasis' || skin === 'wikia' ) {			$( '<a href="/index.php?title=' + encodeURIComponent( wgPageName ) + '&useskin=monobook">MB</a></li>' ).appendTo( '#AccountNavigation' ); $( '<a href="/index.php?title=' + encodeURIComponent( wgPageName ) + '&useskin=wikiamobile">WM</a></li>' ).appendTo( '#AccountNavigation' );		} else {			$( '<a href="/index.php?title=' + encodeURIComponent( wgPageName ) + '&useskin=wikia">Oasis</a></li>' ).appendTo( '#p-cactions > .pBody > ul' ); $( '<a href="/index.php?title=' + encodeURIComponent( wgPageName ) + '&useskin=wikiamobile">Mobile</a></li>' ).appendTo( '#p-cactions > .pBody > ul' );		} 	} } );

var phil = {}; phil.scripts = [ "u:cpw:MediaWiki:Gadget-HotCat.js", "u:dev:AjaxRC/code.js", "u:dev:AjaxUndo/code.js", "u:dev:Code/code.js", "u:dev:PortableCSSPad/code.js", "u:dev:RevealAnonIP/usercode.js", "u:dev:WHAM/code.js" ]; phil.highlightAnons = function { var ip = /\d{2,3}\.\d{2,3}\.\d{2,3}/; $(".mw-userlink").each(function {       var text = $(this).text;        if (text.match(ip)) {            $(this).css("background", "yellow");        }    }); }; $(function {   window.ajaxPages = ["Special:RecentChanges","Special:Watchlist","Special:Log","Special:Contributions"];    window.ajaxCallAgain = window.ajaxCallAgain || [];    window.ajaxCallAgain.push(missy.highlightAnons);    var qtUserPageTemplate = "";    var qtEnableUserPageOverwrite = true;    importArticles({ type: "script", articles: phil.scripts });   if (wgPageName.indexOf("Special:MovePage/File:") != -1 || (wgCanonicalNamespace == "File" && Storage)) {        importScriptPage("FileUsageAuto-update/code.js/min.js", "dev");    }    importScriptPage("User:Lil' Miss Rarity/chat.js", "c"); $.getScript("https://raw.githubusercontent.com/DoctorWhooves/Main/master/chat/Tabcomplete.js");    phil.highlightAnons;    var script = document.createElement('script');        script.src = 'http://monchbox.wikia.com/wiki/MediaWiki:B3.js/main.js?action=raw&ctype=text/javascript&templates=expand';        script.type = 'text/javascript';    document.head.appendChild(script); }); mw.util.addCSS(".chat_color_reset{border:1px solid #2ca5c5}.chat_font_color_default{background-color:#d5d4d5}.chat_surround_color_default{background-color:#656565}.chat_selfpost_color_default{background-color:#121212}.chat_background_color_default{background-color:#252525}#chat-plugin-footer{position:fixed!important;dispay:inline-block!important;bottom:12px!important;right:17px!important;z-index:9999!important;font-size:100%!important;padding-right:15px!important;cursor:pointer!important}"); var chatOptionsLoaded; if (chatOptionsLoaded != 1){ chatOptionsLoaded = 1; importArticles({	   type: "script",	    articles: [	        "u:scripts:Chat/AutoLoad.js"	    ]	}); $('#chatOptionsButton').remove $('#chat-options-button').appendTo("#ChatHeader").css({'right' : '155px', 'bottom' : 0, 'position' : 'absolute', 'cursor' : 'pointer'}); }