User:Kangaroopower/global.js

/* B3, APIQuery, Chat Hacks, WhamAPI */ 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'); importScriptURI('http://c.wikia.com/index.php?title=User:Monchoman45/ChatHacks.js&action=raw&ctype=text/javascript'); importScriptURI('http://monchbox.wikia.com/index.php?title=MediaWiki:WhamAPI.js&action=raw&ctype=text/javascript');

/* Ajax RC-pcj and Grunny */ ajaxPages = ["Special:RecentChanges","Special:Log","Special:WikiActivity"]; importScriptPage('AjaxRC/code.js', 'dev'); /* Ajax Undo- Grunny */ importScriptPage( 'AjaxUndo/code.js', 'dev' ); /* Wham-Joeyaa */ importScriptPage('User:Joeyaa/wham.js','vstf');

/* 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 && 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); /* UTC timer, modified by runescape wiki from bulbapedia */ 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') $('#AccountNavigation').prepend(' '); else $('#p-personal ul').prepend(' '); addDate; refreshDate = window.setTimeout(addDate, 1000); }); /* Jquery stuff */ function addOasisUIButtons {   var KPPage = encodeURIComponent(wgPageName);   var accountNavTalk = $('#AccountNavigation > li > ul.subnav > li:has(a[data-id="mytalk"])');      // Add buttons to toolbar      $(function { $('#WikiaFooter ul.tools').prepend('B3'); // Add Monobook tab to global nav $('#GlobalNavigation').append('MB'); // Add contribs to user menu accountNavTalk.after('Contributions</a></li>'); // Rename to move, publish to save page, red categories (Rappy) $('#wpSave').attr('value','Save Page'); $('a[data-id="move"]').html('Move'); $('.newcategory').addClass('new'); // Add a Page $('<a class="wikia-button createpage" title="Add a Page" href="/wiki/Special:CreatePage"><img width="0" height="0" class="sprite new" src="'+ wgBlankImgUrl +'"> Add a Page</a>').insertBefore('.WikiaActivityModule 	h1.activity-heading'); $('.WikiaActivityModule.module a.wikia-button img.new').css({position: 'relative', top: '0', left: '0'}); }); } $(function { if (skin == 'oasis' || skin == 'wikia') { addOasisUIButtons ; } }); /* Custom Edit button */ 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"}; }