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:AbuseLog"]; importScriptPage('AjaxRC/code.js', 'dev'); var ajaxRefresh = 20000; /* END of ajax auto-refresh */ /* Change "A Wikia contributor" to IP address- Monchoman45 */ importScriptPage('MediaWiki:Common.js/ipAnon.js', 'admintools'); /* Wham-Joeyaa */ importScriptPage('User:Joeyaa/wham.js','vstf'); /* 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'); /* Moncho's Chat Hacks */ importScriptPage('User:Kangaroopower/global.js/chat.js', 'c'); /* Toolbar and Global Nav Changes- Fandyllic and me */ importScriptPage('User:Kangaroopower/global.js/toolbarnavchanges.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'); });

/* add contribs to user menu */ function UserContribsMenuItem { $('ul.AccountNavigation li:first-child ul.subnav li:first-child').after('Contributions'); } addOnloadHook(UserContribsMenuItem);

/* UTC timer, modified by runescape wiki from bublapedia */ var refreshDate; function addDate { var UTCDate = ((new Date).toUTCString).replace("GMT", " "); $('#showdate').empty.append(' ' + UTCDate.substring(5) + ' '); window.clearTimeout(refreshDate); refreshDate = window.setTimeout(addDate, 1000); } $(document).ready(function {   if (skin == 'oasis')         $(' ').appendTo('#GlobalNavigation');    else        $('#p-personal ul').prepend(' ');    addDate;    refreshDate = window.setTimeout(addDate, 1000);    $('#displayTimer').css({'font-size': "12px"}); });

// CUSTOM EDIT BUTTONS if (mwCustomEditButtons) { mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "http://upload.wikimedia.org/wikipedia/en/c/c8/Button_redirect.png", "speedTip": "Redirect", "tagOpen": "#REDIRECT ",    "tagClose": "", "sampleText": "Insert text"}; }