User:TehAnonymous/global.js

/* chat hax */ importScriptPage('User:Monchoman45/ChatHacks.js', 'c');

/* stalk function */ ajaxPages = ["Special:RecentChanges","Special:Log","Special:Contributions"]; importScriptPage('AjaxRC/code.js', 'dev');

/* kill message wall */ 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);} } $(KillMessageWall);

/* kill image popup */ 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);