User:ShermanTheMythran/global.js

if(wgCanonicalSpecialPageName == 'Chat') { var chatHacks = confirm('Enable ChatHacks?'); if (chatHacks == true) { importScriptPage('User:Monchoman45/ChatHacks.js','c'); var chatLogger = confirm('Enable ChatLogger?'); if (chatLogger == true) { importScriptPage('User:Joeytje50/ChatLogger.js', 'runescape'); }	} } else { $(function {		var a = document.getElementsByTagName('a');		for(var i = 0; i < a.length; i++) {			if(a[i].href && a[i].href.indexOf('/wiki/Special:Chat') != -1) {				a[i].onclick = function(event) {event.preventDefault; OpenChatWindow;}			}		}		if(document.body.className.indexOf('skin-oasis') != -1) {window.chatcheck = setInterval('ChatCheck', 200);}	}); function ChatCheck { if($('.chat-join button').length != 0) { $('.chat-join button').replaceWith('' + $('.chat-join button').html + ''); clearInterval(window.chatcheck); }	}	function OpenChatWindow { window.chatwindow = window.open('/wiki/Special:Chat?useskin=wikia', 'chat'); window.chatwindow.onload = function { window.chatwindow.importScriptPage('User:' + wgUserName + '/global.js', 'c'); window.chatwindow.importScript('User:' + wgUserName + '/wikia.js'); }	} }