User:Kangaroopower/global.js

/* B3, Chat Hacks, WhamAPI */ importScriptPage('MediaWiki:B3.js', 'monchbox'); importScriptPage('User:Monchoman45/ChatHacks.js', 'c'); importScriptPage('MediaWiki:WhamAPI.js', 'monchbox');

/* 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'); /* Advanced Oasis UI- Porter21 */ var AdvancedOasisUIConfig = { RCHeader: false }; importScriptPage('AdvancedOasisUI/code.js', 'dev'); /* Adds a timer, and some links */ var refreshDate; var KPPage = "/wiki/"+ wgPageName.replace(/ /g, '_'); function addDate { var UTCDate = (new Date).toUTCString; $('#showdate').empty.append('' + UTCDate.substring(5, 25) + ''); window.clearTimeout(refreshDate); refreshDate = window.setTimeout(addDate, 1000); } $(document).ready(function {       // Shows timer        $(' ').appendTo('#GlobalNavigation');        refreshDate = window.setTimeout(addDate, 1000);        // Monobook link        $('#AccountNavigation').prepend('MB');        // B3 Link        $('#WikiaFooter ul.tools').prepend('B3'); }); /* 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"}; }

/* Adds a notice if someone edits your /Talk page - Moncho */ function RmMessageWall { if(wgPageName != 'User:' + wgUserName + '/Talk') { //check if someone edited your /Talk page var api = new APIQuery({logger: function {}}); api.newQuery('GET', {action: 'query', prop: 'info', titles: 'User:' + wgUserName + '/Talk'}, function(result) {			var pages = result.query.pages;			for(var i in pages) {				if(i > 0 && pages[i].lastrevid > readCookie('msgwl_' + pages[i].title.substring(pages[i].title.lastIndexOf('/') + 1))) {					document.getElementById('WikiaFooter').getElementsByTagName('ul')[0].outerHTML += ' You have <a href="/index.php?title=User:' + wgUserName + '/Talk&redirect=no">new messages</a>. </li></ul>';				}			}		}); api.send(0); }	else {createCookie('msgwl_' + wgPageName.substring(wgPageName.lastIndexOf('/') + 1), wgCurRevisionId, 99999);} } addOnloadHook(RmMessageWall);