User:Kangaroopower/global.js

/* APIQuery and B3-Moncho */ importScriptURI('http://monchbox.wikia.com/index.php?title=MediaWiki:APIQuery.js&action=raw&ctype=text/javascript'); importScriptURI('http://monchbox.wikia.com/index.php?title=MediaWiki:B3.js&action=raw&ctype=text/javascript');

/* Ajax auto-refresh-pcj and Grunny */ ajaxPages = ["Special:RecentChanges","Special:Log","Special:WikiActivity","Special:Contributions"]; importScriptPage('AjaxRC/code.js', 'dev'); var ajaxRefresh = 30000; /* END of ajax auto-refresh */

/* Change "A Wikia contributor" to IP address- fandyllic (I believe) */ importScriptPage('MediaWiki:Common.js/ipAnon.js', 'admintools'); /*Custom Edit buttons- (The help page) */ importScriptPage('User:Kangaroopower/global.js/editbuttons.js', 'c'); /* Wham-Joeyaa */ importScriptPage('User:Kangaroopower/global.js/wham.js', 'c'); /* Moncho's wham */ importScriptURI('http://monchbox.wikia.com/index.php?title=MediaWiki:WhamAPI.js&action=raw&ctype=text/javascript'); /*Custom Rollbacks-Moncho and Grunny */ importScriptPage('User:Kangaroopower/global.js/customrollbacks.js', 'c'); /* UTC Timer-Moncho */ importScriptPage('User:Kangaroopower/global.js/utctimer.js', 'c'); /* User Menu Changes-Moncho */ importScriptPage('User:Kangaroopower/global.js/usermenu.js', 'c'); /* Moncho's Chat Hacks */ importScriptPage('User:Kangaroopower/global.js/chat.js', 'c');

/* kill image popups- Rappy */ window.wgEnableImageLightboxExt = false; function changeimagelinks { $('#WikiaArticle, .LatestPhotosModule, #article-comments').unbind('click.lightbox'); var a = document.getElementsByTagName('a'); for(var t = 0; t < a.length; ++t) { var a2 = a[t]; var img = a2.getElementsByTagName('img'); if(img[0] != null) { if (a2.href.indexOf('images.wikia.com') != -1) { var link = wgServer + '/wiki/File:' + a2.href.substring(a2.href.lastIndexOf('/') + 1); a2.setAttribute('href',link); }		}	} } addOnloadHook(changeimagelinks);

/* Editing fixes- by Rappy */ $(function {   $('#wpSave').attr('value','Save Page');    $('a[data-id="move"]').html('Move'); });

/* Red Categories- by Rappy */ $(function { $('.newcategory').addClass('new'); });

/* Global Nav Changes- Fandyllic */ 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:80%;">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:80%;">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:80%;">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:80%;">Wikia App</a></li>').appendTo('#GlobalNavigation'); break; case 'app': case 'wikiaapp': $('<a href="/index.php?title='+encodeURIComponent(wgPageName)+'&useskin=monobook" style="font-size:80%;">Monobook</a></li> <a href="/index.php?title='+encodeURIComponent(wgPageName)+'&useskin=wikiaapp" style="font-size:80%;">Wikia App</a></li> ').appendTo('#GlobalNavigation'); break; } }