User:Kangaroobot/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:WikiActivity"]; importScriptPage('AjaxRC/code.js', 'dev'); var ajaxRefresh = 20000; /* Ajax Undo- Grunny */ importScriptPage( 'AjaxUndo/code.js', 'dev' ); /* UTC timer, modified by runescape wiki from bulbapedia */ var refreshDate; function addDate { var UTCDate = ((new Date).toUTCString).replace("GMT", "(UTC)"); $('#showdate').empty.append(' ' + UTCDate.substring(5) + ' '); window.clearTimeout(refreshDate); refreshDate = window.setTimeout(addDate, 1000); } $(document).ready(function {   if (skin == 'oasis')         $('#AccountNavigation').prepend(' ');    else        $('#p-personal ul').prepend(' ');    addDate;    refreshDate = window.setTimeout(addDate, 1000); }); /* Haxed Buttons - Based off of Porter21's code. */ function addOasisUIButtons { var KPPage = encodeURIComponent(wgPageName); var accountNavTalk = $('#AccountNavigation > li > ul.subnav > li:has(a[data-id="mytalk"])'); var toolbar = $('#WikiaFooter ul.tools'); // Add buttons to toolbar $(function {        toolbar.prepend('B3');      }); // add contribs to user menu $(function {         accountNavTalk.after('Contributions');      }); // red categories (Rappy) $(function {      $('.newcategory').addClass('new');      }); } jQuery(function($) {  if (skin == 'oasis' || skin == 'wikia') {      addOasisUIButtons ;   } }); $(function {    $('.contribute ul').html('Recent Changes</a></li><a data-canonical="random" href="/wiki/Special:Random">Random page</a></li>'); });