User:Fandyllic/global.js

/* Back to top button on Wikia bottom tool bar */ importScriptPage('BackToTopButton/code.js', 'dev');

/* Experimental auto signer http://dev.wikia.com/wiki/Sine */ /* Disable for now importScriptPage('Sine/code.js', 'dev');

/* Skin switch links at top bar */ /* Disable for now 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; } }

/* Add Contributions to user drop down */ /* Disable for now 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);

/* Convert "Anonymous" in Comments to IP address from User:Monchoman45                        */ /* Disable for now function AnonIP { var list = document.getElementsByTagName('a'); for(var i in list) { if(list[i].href && list[i].href.indexOf('Special:Contributions/') && list[i].innerHTML == 'A Wikia contributor') { list[i].innerHTML = list[i].href.substring(list[i].href.lastIndexOf('/') + 1, list[i].href.length); }	} } addOnloadHook(AnonIP); /* END Convert "Anonymous" in Comments to IP address */

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