User:TehAnonymous/global.js

importScriptPage('User:Monchoman45/ChatHacks.js', 'c'); ajaxPages = ["Special:RecentChanges","Special:Log","Special:Contributions"]; importScriptPage('AjaxRC/code.js', 'dev'); function KillMessageWall { if(wgPageName != 'User:' + wgUserName + '/talk' && wgPageName != 'User:' + wgUserName + '/Talk') { //check if someone edited your /talk or /Talk page var api = new APIQuery({logger: function {}}); api.newQuery('GET', {action: 'query', prop: 'info', titles: 'User:' + wgUserName + '/talk|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))) {					var sub = pages[i].title.substring(pages[i].title.lastIndexOf('/') + 1);					if(skin == 'oasis') {						document.getElementById('WikiaFooter').getElementsByTagName('ul')[0].outerHTML += ' You have new messages. ';					}					else {						document.getElementById('contentSub').outerHTML += ' You have new messages (show most recent). ';					}				}			}		});		api.send(0);	}	else {createCookie('msgwl_' + wgPageName.substring(wgPageName.lastIndexOf('/') + 1), wgCurRevisionId, 99999);} } if(readCookie('globalJS') == 'true') {addOnloadHook(KillMessageWall);}