User:Fandyllic/global.js

if( wgNamespaceNumber != -1 && !window.SkinSwitchLoad ) { addOnloadHook( addSkinSwitchButton ); } var SkinSwitchLoad = true; // prevent duplication function addSkinSwitchButton { switch( skin ) { case 'answers': $('Monobook Oasis Wikia App').appendTo('#page_controls'); break; case 'uncyclopedia': /* pass to monobook */ case 'wikiaphone': /* pass to monobook */ case 'monobook': $('<a href="/index.php?title='+encodeURIComponent(wgPageName)+'&useskin=wikia" style="font-size:60%;">Oasis</a></li> <img src="/skins/common/blank.gif" class="sprite search" /><a id="ca-skins" href="/index.php?title='+encodeURIComponent(wgPageName)+'&useskin=wikiaapp" rel="nofollow" style="font-size:60%;">Wikia App</a></li>').appendTo('#p-cactions > .pBody > ul'); break; case 'oasis': case 'wikia': $('<a href="/index.php?title='+encodeURIComponent(wgPageName)+'&useskin=monobook" style="font-size:60%;">Monobook</a></li>  <img src="/skins/common/blank.gif" class="sprite search" /><a id="ca-skins" href="/index.php?title='+encodeURIComponent(wgPageName)+'&useskin=wikiaapp" rel="nofollow" style="font-size:60%;">Wikia App</a></li>').appendTo('#GlobalNavigation'); break; case 'app': case 'wikiaapp': $('<a href="/index.php?title='+encodeURIComponent(wgPageName)+'&useskin=monobook" style="font-size:60%;">Monobook</a></li> <a href="/index.php?title='+encodeURIComponent(wgPageName)+'&useskin=wikiaapp" style="font-size:60%;">Wikia App</a></li> ').appendTo('#GlobalNavigation'); break; } }

function UserContribsMenuItem { $('ul.AccountNavigation li:first-child ul.subnav li:first-child').after('<a href="/wiki/Special:Contributions/'+ encodeURIComponent (wgUserName) +'">Contributions</a></li>'); }

addOnloadHook(UserContribsMenuItem);

function idAnon { // use IP address to identify "Anonymous user" comments $("div.comment > div.detail > span:contains('Anonymous user')").each( function {       var ipaddr = $(this).attr('title');        $(this).text("Anon " + ipaddr + " user");    }); } addOnloadHook(idAnon);

// Adds a 'Back to page' link under the preview header when previewing an edit. if (wgAction == "submit") $('#WikiaEditBoxHeader p').clone.appendTo('#WikiaPageHeader:first-child');