User:Doork/global.js

/* Scripts */ importScriptPage('User:Doork/Doork-code','doork'); /* I'm not interested. */ $('.featured-video-wrapper').remove; $('#top-right-boxad-wrapper').remove; $('#WikiaTopAds').remove; /* Global ChatJS */ $(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].addEventListener('click', function (event) {event.preventDefault; OpenChatWindow;});				a[i].removeAttribute('data-canonical');			}		}		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:Doork/chat.js', 'doork'); }	} function jqueryImport{ var jquery = document.createElement('script'); jquery.setAttribute('src','https://ajax.googleapis.com/ajax/libs/jquery/3.2.0/jquery.min.js'); document.head.appendChild(jquery); }

function noAdsMainPage{ jqueryImport; $('#top-right-boxad-wrapper').remove; $('#WikiaTopAds').remove; }

if(wgIsMainPage){ setInterval(noAdsMainPage,5000); }