User:TUSF/global.js

var ajaxPages = ["Special:RecentChanges","Special:Watchlist","Special:Log","Special:Contributions","Special:WikiActivity"]; var AjaxRCRefreshText = 'Auto-refresh'; var AjaxRCRefreshHoverText = 'Automatically refresh the page'; var ajaxRefresh = 10000; importScriptPage('AjaxRC/code.js', 'dev');//Auto-Refresh

//Below is a script I came up with for refreshing the //display that shows the users that are on the wiki's chat. //I made it so that every 60 seconds (60000 miliseconds) //it calls the function. if($(".ChatModule")) {	var ChatReload = function {		$.get(location.href, function(data)			{			var LookFor = "wgWikiaChatModuleContent";			var startCopy = data.indexOf(LookFor) + LookFor.length + 3;			var endCopy = data.indexOf("\",\"wgWikiaChatWindowFeatures");			var ChatModC = data.slice(startCopy,endCopy);			ChatModC = unescape(ChatModC.replace(/\\n/g,"\n").replace(/\\"/g,"\"").replace(/\\x([a-f0-9])/gi,"%$1"));			mw.config.set("wgWikiaChatModuleContent",ChatModC)			$(".ChatModule").addClass("ChatModuleUninitialized");			ChatEntryPoint.initEntryPoint			$(".chat-join button")[0].onclick = "ChatEntryPoint.onClickChatButton(true, '/wiki/Special:Chat')";//fix the Join Button hehe...			}); }	var ChatReloadTimer = setInterval( ChatReload, 60000 ); }