User blog:Reapeageddon/How to Log Chat: A Reapeageddon Tutorial

Hello! Since I can't log chat alone, I will be teaching you how to log chat!

Tutorial
1. Go to Special:MyPage/chat.js

2. Edit it and paste the following code. ​// ************ // Chat options import // ************ // Written by Sactage, Callofduty4 and Madnessfan34537 var chatOptionsLoaded; if ( chatOptionsLoaded != 1 ) { chatOptionsLoaded = 1 ; importScriptPage( <span class="st0" style="color:rgb(42,161,152);">'MediaWiki:Chat.js/options.js' <span class="sy0" style="color:rgb(51,153,51);">, <span class="st0" style="color:rgb(42,161,152);">'cod' <span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">; <span class="br0" style="color:rgb(0,153,0);">} <span class="co1" style="font-style:italic;color:rgb(147,161,161);">//Chat Logger by Joeytje50; Modified position for proper use by Guppie the Third <span class="co1" style="font-style:italic;color:rgb(147,161,161);">// <span class="co1" style="font-style:italic;color:rgb(147,161,161);">//When using this script, please remember to import chathacks too, and set your ping phrases to a long random string that will never be said in the chat, so that the logs won't show the red highlight. <span class="co1" style="font-style:italic;color:rgb(147,161,161);">//import this using importScript('User:Joeytje50/ChatLogger.js') <span class="co1" style="font-style:italic;color:rgb(147,161,161);">//To set an interval of submitting logs, put var logInterval = (amount of milliseconds); above the import. Default is 1 hour. <span class="co1" style="font-style:italic;color:rgb(147,161,161);">//cookie functions <span class="kw0" style="font-weight:bold;color:rgb(7,54,66);">function <span class="re0" style="color:rgb(38,139,210);">setCookie <span class="br0" style="color:rgb(0,153,0);">( c_name<span class="sy0" style="color:rgb(51,153,51);">, value<span class="sy0" style="color:rgb(51,153,51);">, expiredays <span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">{ <span class="kw0" style="font-weight:bold;color:rgb(7,54,66);">var exdate <span class="sy0" style="color:rgb(51,153,51);">= <span class="kw1" style="font-weight:bold;color:rgb(133,153,0);">new Date<span class="br0" style="color:rgb(0,153,0);">( <span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">; exdate.<span class="me1" style="color:rgb(38,139,210);">setDate <span class="br0" style="color:rgb(0,153,0);">( exdate.<span class="me1" style="color:rgb(38,139,210);">getDate <span class="br0" style="color:rgb(0,153,0);">( <span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">+ expiredays<span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">; document.<span class="me1" style="color:rgb(38,139,210);">cookie <span class="sy0" style="color:rgb(51,153,51);">= c_name <span class="sy0" style="color:rgb(51,153,51);">+ <span class="st0" style="color:rgb(42,161,152);">"=" <span class="sy0" style="color:rgb(51,153,51);">+ escape<span class="br0" style="color:rgb(0,153,0);">( value<span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">+ <span class="br0" style="color:rgb(0,153,0);">( <span class="br0" style="color:rgb(0,153,0);">( expiredays <span class="sy0" style="color:rgb(51,153,51);">=== <span class="kw2" style="font-weight:bold;color:rgb(181,137,0);">null <span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">? <span class="st0" style="color:rgb(42,161,152);">"" <span class="sy0" style="color:rgb(51,153,51);">: <span class="st0" style="color:rgb(42,161,152);">";expires=" <span class="sy0" style="color:rgb(51,153,51);">+ exdate.<span class="me1" style="color:rgb(38,139,210);">toGMTString <span class="br0" style="color:rgb(0,153,0);">( <span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">; <span class="br0" style="color:rgb(0,153,0);">} <span class="kw0" style="font-weight:bold;color:rgb(7,54,66);">function <span class="re0" style="color:rgb(38,139,210);">getCookie <span class="br0" style="color:rgb(0,153,0);">( c_name <span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">{ <span class="kw1" style="font-weight:bold;color:rgb(133,153,0);">if <span class="br0" style="color:rgb(0,153,0);">( document.<span class="me1" style="color:rgb(38,139,210);">cookie .<span class="me1" style="color:rgb(38,139,210);">length <span class="sy0" style="color:rgb(51,153,51);">> <span class="nu0" style="color:rgb(211,54,130);">0 <span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">{ <span class="kw0" style="font-weight:bold;color:rgb(7,54,66);">var c_start <span class="sy0" style="color:rgb(51,153,51);">= document.<span class="me1" style="color:rgb(38,139,210);">cookie .<span class="me1" style="color:rgb(38,139,210);">indexOf <span class="br0" style="color:rgb(0,153,0);">( c_name <span class="sy0" style="color:rgb(51,153,51);">+ <span class="st0" style="color:rgb(42,161,152);">"=" <span class="br0" style="color:rgb(0,153,0);">) <span class="kw1" style="font-weight:bold;color:rgb(133,153,0);">if <span class="br0" style="color:rgb(0,153,0);">( c_start <span class="sy0" style="color:rgb(51,153,51);">!== <span class="sy0" style="color:rgb(51,153,51);">- <span class="nu0" style="color:rgb(211,54,130);">1 <span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">{ c_start <span class="sy0" style="color:rgb(51,153,51);">= c_start <span class="sy0" style="color:rgb(51,153,51);">+ c_name.<span class="me1" style="color:rgb(38,139,210);">length <span class="sy0" style="color:rgb(51,153,51);">+ <span class="nu0" style="color:rgb(211,54,130);">1 <span class="sy0" style="color:rgb(51,153,51);">; <span class="kw0" style="font-weight:bold;color:rgb(7,54,66);">var c_end <span class="sy0" style="color:rgb(51,153,51);">= document.<span class="me1" style="color:rgb(38,139,210);">cookie .<span class="me1" style="color:rgb(38,139,210);">indexOf <span class="br0" style="color:rgb(0,153,0);">( <span class="st0" style="color:rgb(42,161,152);">";" <span class="sy0" style="color:rgb(51,153,51);">, c_start <span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">; <span class="kw1" style="font-weight:bold;color:rgb(133,153,0);">if <span class="br0" style="color:rgb(0,153,0);">( c_end <span class="sy0" style="color:rgb(51,153,51);">=== <span class="sy0" style="color:rgb(51,153,51);">- <span class="nu0" style="color:rgb(211,54,130);">1 <span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">{ c_end <span class="sy0" style="color:rgb(51,153,51);">= document.<span class="me1" style="color:rgb(38,139,210);">cookie .<span class="me1" style="color:rgb(38,139,210);">length <span class="sy0" style="color:rgb(51,153,51);">; <span class="br0" style="color:rgb(0,153,0);">} <span class="kw1" style="font-weight:bold;color:rgb(133,153,0);">return unescape<span class="br0" style="color:rgb(0,153,0);">( document.<span class="me1" style="color:rgb(38,139,210);">cookie .<span class="me1" style="color:rgb(38,139,210);">substring <span class="br0" style="color:rgb(0,153,0);">( c_start<span class="sy0" style="color:rgb(51,153,51);">, c_end <span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">; <span class="br0" style="color:rgb(0,153,0);">} <span class="br0" style="color:rgb(0,153,0);">} <span class="kw1" style="font-weight:bold;color:rgb(133,153,0);">return <span class="st0" style="color:rgb(42,161,152);">"" <span class="sy0" style="color:rgb(51,153,51);">; <span class="br0" style="color:rgb(0,153,0);">} <span class="co1" style="font-style:italic;color:rgb(147,161,161);">//Script <span class="kw1" style="font-weight:bold;color:rgb(133,153,0);">if <span class="br0" style="color:rgb(0,153,0);">( wgCanonicalSpecialPageName<span class="sy0" style="color:rgb(51,153,51);">== <span class="st0" style="color:rgb(42,161,152);">"Chat" <span class="sy0" style="color:rgb(51,153,51);">&& skin<span class="sy0" style="color:rgb(51,153,51);">== <span class="st0" style="color:rgb(42,161,152);">"oasis" <span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">{ <span class="kw1" style="font-weight:bold;color:rgb(133,153,0);">$ <span class="br0" style="color:rgb(0,153,0);">( <span class="st0" style="color:rgb(42,161,152);">'form#Write' <span class="br0" style="color:rgb(0,153,0);">) .<span class="me1" style="color:rgb(38,139,210);">append <span class="br0" style="color:rgb(0,153,0);">( <span class="st0" style="color:rgb(42,161,152);">'<a class="wikia-button" href="javascript:submitLog" style="position:absolute; right:94px; top:0;" title="submit chat log">submit</a>' <span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">; <span class="kw1" style="font-weight:bold;color:rgb(133,153,0);">if <span class="br0" style="color:rgb(0,153,0);">( getCookie<span class="br0" style="color:rgb(0,153,0);">( <span class="st0" style="color:rgb(42,161,152);">'lastRestart' <span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">== <span class="st0" style="color:rgb(42,161,152);">"" <span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">{ setCookie<span class="br0" style="color:rgb(0,153,0);">( <span class="st0" style="color:rgb(42,161,152);">'lastRestart' <span class="sy0" style="color:rgb(51,153,51);">, <span class="nu0" style="color:rgb(211,54,130);">0 <span class="sy0" style="color:rgb(51,153,51);">, <span class="nu0" style="color:rgb(211,54,130);">1000 <span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">} <span class="co1" style="font-style:italic;color:rgb(147,161,161);">//--- <span class="kw0" style="font-weight:bold;color:rgb(7,54,66);">function <span class="re0" style="color:rgb(38,139,210);">restartChat <span class="br0" style="color:rgb(0,153,0);">( <span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">{ window.<span class="me1" style="color:rgb(38,139,210);">chatwindow <span class="sy0" style="color:rgb(51,153,51);">= window.<span class="me1" style="color:rgb(38,139,210);">open <span class="br0" style="color:rgb(0,153,0);">( <span class="st0" style="color:rgb(42,161,152);">'/index.php?title=Special:Chat&useskin=wikia' <span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">; window.<span class="me1" style="color:rgb(38,139,210);">chatwindow .<span class="me1" style="color:rgb(38,139,210);">onload <span class="sy0" style="color:rgb(51,153,51);">= <span class="kw0" style="font-weight:bold;color:rgb(7,54,66);">function <span class="br0" style="color:rgb(0,153,0);">( <span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">{ window.<span class="me1" style="color:rgb(38,139,210);">chatwindow .<span class="kw1" style="font-weight:bold;color:rgb(133,153,0);">$ <span class="br0" style="color:rgb(0,153,0);">( <span class="st0" style="color:rgb(42,161,152);">'body' <span class="br0" style="color:rgb(0,153,0);">) .<span class="me1" style="color:rgb(38,139,210);">prepend <span class="br0" style="color:rgb(0,153,0);">( <span class="st0" style="color:rgb(42,161,152);">' <span class="es0" style="font-weight:bold;color:rgb(0,0,153);">\n function importScript(b){var a=wgScript+"?title="+encodeURIComponent(b.replace(/ /g,"_")).replace(/%2F/ig,"/").replace(/%3A/ig,":")+"&action=raw&ctype=text/javascript";return importScriptURI(a)}<span class="es0" style="font-weight:bold;color:rgb(0,0,153);">\n function importScriptURI(a){var b=document.createElement("script");b.setAttribute("src",a);b.setAttribute("type","text/javascript");document.getElementsByTagName("head")[0].appendChild(b);return b}<span class="es0" style="font-weight:bold;color:rgb(0,0,153);">\n function importScriptPage(b,d){var a="/index.php?title="+encodeURIComponent(b.replace(/ /g,"_")).replace("%2F","/").replace("%3A",":")+"&action=raw&ctype=text/javascript";if(typeof d=="string"){if(d.indexOf("://")==-1){a="http://"+d+".wikia.com"+a}else{a=d+a}}return importScriptURI(a)}<span class="es0" style="font-weight:bold;color:rgb(0,0,153);">\n function importStylesheet(a){return importStylesheetURI(wgScript+"?action=raw&ctype=text/css&title="+encodeURIComponent(a.replace(/ /g,"_")))}<span class="es0" style="font-weight:bold;color:rgb(0,0,153);">\n function importStylesheetURI(b,d){var a=document.createElement("link");a.type="text/css";a.rel="stylesheet";a.href=b;if(d){a.media=d}document.getElementsByTagName("head")[0].appendChild(a);return a}<span class="es0" style="font-weight:bold;color:rgb(0,0,153);">\n function importStylesheetPage(b,d){var a="/index.php?title="+encodeURIComponent(b.replace(/ /g,"_")).replace("%2F","/").replace("%3A",":")+"&action=raw&ctype=text/css";if(typeof d=="string"){if(d.indexOf("://")==-1){a="http://"+d+".wikia.com"+a}else{a=d+a}}return importStylesheetURI(a)}<span class="es0" style="font-weight:bold;color:rgb(0,0,153);">\n //This isn<span class="es0" style="font-weight:bold;color:rgb(0,0,153);">\' t the same as the regular addOnloadHook, because the regular one runs from a script tag in the body that I don<span class="es0" style="font-weight:bold;color:rgb(0,0,153);">\' t feel like appending. It<span class="es0" style="font-weight:bold;color:rgb(0,0,153);">\' s easier to just make it $(function), which is essentially equivalent<span class="es0" style="font-weight:bold;color:rgb(0,0,153);">\n function addOnloadHook(func) {$(func);}<span class="es0" style="font-weight:bold;color:rgb(0,0,153);">\n ' <span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">; 		<span class="co1" style="font-style:italic;color:rgb(147,161,161);">//global.js  		window.<span class="me1" style="color:rgb(38,139,210);">chatwindow .<span class="me1" style="color:rgb(38,139,210);">importScriptURI <span class="br0" style="color:rgb(0,153,0);">( <span class="st0" style="color:rgb(42,161,152);">'http://community.wikia.com/index.php?title=User:' <span class="sy0" style="color:rgb(51,153,51);">+ wgUserName <span class="sy0" style="color:rgb(51,153,51);">+ <span class="st0" style="color:rgb(42,161,152);">'/global.js&action=raw&ctype=text/javascript' <span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">; <span class="co1" style="font-style:italic;color:rgb(147,161,161);">//wikia.js 		window.<span class="me1" style="color:rgb(38,139,210);">chatwindow .<span class="me1" style="color:rgb(38,139,210);">importScriptURI <span class="br0" style="color:rgb(0,153,0);">( wgServer <span class="sy0" style="color:rgb(51,153,51);">+ <span class="st0" style="color:rgb(42,161,152);">'/index.php?title=User:' <span class="sy0" style="color:rgb(51,153,51);">+ wgUserName <span class="sy0" style="color:rgb(51,153,51);">+ <span class="st0" style="color:rgb(42,161,152);">'/wikia.js&action=raw&ctype=text/javascript' <span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">; <span class="co1" style="font-style:italic;color:rgb(147,161,161);">//global.css window.<span class="me1" style="color:rgb(38,139,210);">chatwindow .<span class="me1" style="color:rgb(38,139,210);">importStylesheetURI <span class="br0" style="color:rgb(0,153,0);">( <span class="st0" style="color:rgb(42,161,152);">'http://community.wikia.com/index.php?title=User:' <span class="sy0" style="color:rgb(51,153,51);">+ wgUserName <span class="sy0" style="color:rgb(51,153,51);">+ <span class="st0" style="color:rgb(42,161,152);">'/global.css&action=raw&ctype=text/css' <span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">; <span class="co1" style="font-style:italic;color:rgb(147,161,161);">//wikia.css window.<span class="me1" style="color:rgb(38,139,210);">chatwindow .<span class="me1" style="color:rgb(38,139,210);">importStylesheetURI <span class="br0" style="color:rgb(0,153,0);">( wgServer <span class="sy0" style="color:rgb(51,153,51);">+ <span class="st0" style="color:rgb(42,161,152);">'/index.php?title=User:' <span class="sy0" style="color:rgb(51,153,51);">+ wgUserName <span class="sy0" style="color:rgb(51,153,51);">+ <span class="st0" style="color:rgb(42,161,152);">'/wikia.css&action=raw&ctype=text/css' <span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">; window.<span class="me1" style="color:rgb(38,139,210);">close <span class="br0" style="color:rgb(0,153,0);">( <span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">} <span class="br0" style="color:rgb(0,153,0);">} <span class="kw0" style="font-weight:bold;color:rgb(7,54,66);">function <span class="re0" style="color:rgb(38,139,210);">dcRestart <span class="br0" style="color:rgb(0,153,0);">( <span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">{ <span class="kw1" style="font-weight:bold;color:rgb(133,153,0);">if <span class="br0" style="color:rgb(0,153,0);">( <span class="kw1" style="font-weight:bold;color:rgb(133,153,0);">$ <span class="br0" style="color:rgb(0,153,0);">( <span class="st0" style="color:rgb(42,161,152);">'.inline-alert:contains("You have been disconnected")' <span class="br0" style="color:rgb(0,153,0);">) .<span class="me1" style="color:rgb(38,139,210);">length <span class="sy0" style="color:rgb(51,153,51);">> <span class="nu0" style="color:rgb(211,54,130);">0 <span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">{ submitLog<span class="br0" style="color:rgb(0,153,0);">( <span class="st0" style="color:rgb(42,161,152);">'restart' <span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">} callAPI<span class="br0" style="color:rgb(0,153,0);">( <span class="br0" style="color:rgb(0,153,0);">{ 		<span class="st0" style="color:rgb(42,161,152);">'action' <span class="sy0" style="color:rgb(51,153,51);">: <span class="st0" style="color:rgb(42,161,152);">'query' <span class="sy0" style="color:rgb(51,153,51);">,  		<span class="st0" style="color:rgb(42,161,152);">'prop' <span class="sy0" style="color:rgb(51,153,51);">: <span class="st0" style="color:rgb(42,161,152);">'info|revisions' <span class="sy0" style="color:rgb(51,153,51);">,  		<span class="st0" style="color:rgb(42,161,152);">'titles' <span class="sy0" style="color:rgb(51,153,51);">: <span class="st0" style="color:rgb(42,161,152);">'User:' <span class="sy0" style="color:rgb(51,153,51);">+ wgUserName<span class="sy0" style="color:rgb(51,153,51);">+ <span class="st0" style="color:rgb(42,161,152);">'/Restart' <span class="sy0" style="color:rgb(51,153,51);">, <span class="st0" style="color:rgb(42,161,152);">'rvprop' <span class="sy0" style="color:rgb(51,153,51);">: <span class="st0" style="color:rgb(42,161,152);">'content' <span class="sy0" style="color:rgb(51,153,51);">, <span class="st0" style="color:rgb(42,161,152);">'rvlimit' <span class="sy0" style="color:rgb(51,153,51);">: <span class="st0" style="color:rgb(42,161,152);">'1' <span class="sy0" style="color:rgb(51,153,51);">, <span class="st0" style="color:rgb(42,161,152);">'indexpageids' <span class="sy0" style="color:rgb(51,153,51);">: <span class="st0" style="color:rgb(42,161,152);">'true' <span class="sy0" style="color:rgb(51,153,51);">, <span class="br0" style="color:rgb(0,153,0);">} <span class="sy0" style="color:rgb(51,153,51);">, <span class="st0" style="color:rgb(42,161,152);">'GET' <span class="sy0" style="color:rgb(51,153,51);">, <span class="kw0" style="font-weight:bold;color:rgb(7,54,66);">function <span class="br0" style="color:rgb(0,153,0);">( response<span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">{ <span class="kw0" style="font-weight:bold;color:rgb(7,54,66);">var page <span class="sy0" style="color:rgb(51,153,51);">= response.<span class="me1" style="color:rgb(38,139,210);">query .<span class="me1" style="color:rgb(38,139,210);">pages <span class="br0" style="color:rgb(0,153,0);">[ response.<span class="me1" style="color:rgb(38,139,210);">query .<span class="me1" style="color:rgb(38,139,210);">pageids <span class="br0" style="color:rgb(0,153,0);">[ <span class="nu0" style="color:rgb(211,54,130);">0 <span class="br0" style="color:rgb(0,153,0);">] <span class="br0" style="color:rgb(0,153,0);">] <span class="sy0" style="color:rgb(51,153,51);">; <span class="kw0" style="font-weight:bold;color:rgb(7,54,66);">var restartPage <span class="sy0" style="color:rgb(51,153,51);">= page.<span class="me1" style="color:rgb(38,139,210);">revisions <span class="br0" style="color:rgb(0,153,0);">[ <span class="nu0" style="color:rgb(211,54,130);">0 <span class="br0" style="color:rgb(0,153,0);">] <span class="br0" style="color:rgb(0,153,0);">[ <span class="st0" style="color:rgb(42,161,152);">'*' <span class="br0" style="color:rgb(0,153,0);">] .<span class="me1" style="color:rgb(38,139,210);">split <span class="br0" style="color:rgb(0,153,0);">( <span class="st0" style="color:rgb(42,161,152);">'<span class="es0" style="font-weight:bold;color:rgb(0,0,153);">\n ' <span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">[ <span class="nu0" style="color:rgb(211,54,130);">0 <span class="br0" style="color:rgb(0,153,0);">] <span class="kw1" style="font-weight:bold;color:rgb(133,153,0);">if <span class="br0" style="color:rgb(0,153,0);">( escape<span class="br0" style="color:rgb(0,153,0);">( restartPage<span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">!= getCookie<span class="br0" style="color:rgb(0,153,0);">( <span class="st0" style="color:rgb(42,161,152);">'lastRestart' <span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">{ setCookie<span class="br0" style="color:rgb(0,153,0);">( <span class="st0" style="color:rgb(42,161,152);">'lastRestart' <span class="sy0" style="color:rgb(51,153,51);">, restartPage<span class="sy0" style="color:rgb(51,153,51);">, <span class="nu0" style="color:rgb(211,54,130);">1000 <span class="br0" style="color:rgb(0,153,0);">) submitLog<span class="br0" style="color:rgb(0,153,0);">( <span class="st0" style="color:rgb(42,161,152);">'restartChat' <span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">} <span class="br0" style="color:rgb(0,153,0);">} <span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">}  <span class="co1" style="font-style:italic;color:rgb(147,161,161);">//---  <span class="kw0" style="font-weight:bold;color:rgb(7,54,66);">var d <span class="sy0" style="color:rgb(51,153,51);">= <span class="kw1" style="font-weight:bold;color:rgb(133,153,0);">new Date<span class="br0" style="color:rgb(0,153,0);">( <span class="br0" style="color:rgb(0,153,0);">)  <span class="kw0" style="font-weight:bold;color:rgb(7,54,66);">var curTime <span class="sy0" style="color:rgb(51,153,51);">= <span class="br0" style="color:rgb(0,153,0);">[ <span class="st0" style="color:rgb(42,161,152);"> <span class="sy0" style="color:rgb(51,153,51);">, <span class="st0" style="color:rgb(42,161,152);"> <span class="sy0" style="color:rgb(51,153,51);">, <span class="st0" style="color:rgb(42,161,152);">'' <span class="br0" style="color:rgb(0,153,0);">] curTime<span class="br0" style="color:rgb(0,153,0);">[ <span class="nu0" style="color:rgb(211,54,130);">0 <span class="br0" style="color:rgb(0,153,0);">] <span class="sy0" style="color:rgb(51,153,51);">= d.<span class="me1" style="color:rgb(38,139,210);">getUTCHours <span class="br0" style="color:rgb(0,153,0);">( <span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">; curTime<span class="br0" style="color:rgb(0,153,0);">[ <span class="nu0" style="color:rgb(211,54,130);">1 <span class="br0" style="color:rgb(0,153,0);">] <span class="sy0" style="color:rgb(51,153,51);">= d.<span class="me1" style="color:rgb(38,139,210);">getUTCMinutes <span class="br0" style="color:rgb(0,153,0);">( <span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">; curTime<span class="br0" style="color:rgb(0,153,0);">[ <span class="nu0" style="color:rgb(211,54,130);">2 <span class="br0" style="color:rgb(0,153,0);">] <span class="sy0" style="color:rgb(51,153,51);">= d.<span class="me1" style="color:rgb(38,139,210);">getUTCSeconds <span class="br0" style="color:rgb(0,153,0);">( <span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">; <span class="kw0" style="font-weight:bold;color:rgb(7,54,66);">var timeTillMidnight <span class="sy0" style="color:rgb(51,153,51);">= <span class="br0" style="color:rgb(0,153,0);">( <span class="br0" style="color:rgb(0,153,0);">( <span class="nu0" style="color:rgb(211,54,130);">23 <span class="sy0" style="color:rgb(51,153,51);">- curTime<span class="br0" style="color:rgb(0,153,0);">[ <span class="nu0" style="color:rgb(211,54,130);">0 <span class="br0" style="color:rgb(0,153,0);">] <span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">* <span class="nu0" style="color:rgb(211,54,130);">60 <span class="sy0" style="color:rgb(51,153,51);">* <span class="nu0" style="color:rgb(211,54,130);">60000 <span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">+ <span class="br0" style="color:rgb(0,153,0);">( <span class="br0" style="color:rgb(0,153,0);">( <span class="nu0" style="color:rgb(211,54,130);">59 <span class="sy0" style="color:rgb(51,153,51);">- curTime<span class="br0" style="color:rgb(0,153,0);">[ <span class="nu0" style="color:rgb(211,54,130);">1 <span class="br0" style="color:rgb(0,153,0);">] <span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">* <span class="nu0" style="color:rgb(211,54,130);">60000 <span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">+ <span class="br0" style="color:rgb(0,153,0);">( <span class="br0" style="color:rgb(0,153,0);">( <span class="nu0" style="color:rgb(211,54,130);">60 <span class="sy0" style="color:rgb(51,153,51);">- curTime<span class="br0" style="color:rgb(0,153,0);">[ <span class="nu0" style="color:rgb(211,54,130);">2 <span class="br0" style="color:rgb(0,153,0);">] <span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">* <span class="nu0" style="color:rgb(211,54,130);">1000 <span class="br0" style="color:rgb(0,153,0);">) setTimeout<span class="br0" style="color:rgb(0,153,0);">( <span class="st0" style="color:rgb(42,161,152);">'setInterval("submitLog",86400000)' <span class="sy0" style="color:rgb(51,153,51);">, timeTillMidnight<span class="br0" style="color:rgb(0,153,0);">) setTimeout<span class="br0" style="color:rgb(0,153,0);">( <span class="st0" style="color:rgb(42,161,152);">'submitLog' <span class="sy0" style="color:rgb(51,153,51);">, timeTillMidnight<span class="br0" style="color:rgb(0,153,0);">) setInterval<span class="br0" style="color:rgb(0,153,0);">( <span class="st0" style="color:rgb(42,161,152);">'dcRestart' <span class="sy0" style="color:rgb(51,153,51);">, <span class="nu0" style="color:rgb(211,54,130);">60000 <span class="br0" style="color:rgb(0,153,0);">) <span class="kw0" style="font-weight:bold;color:rgb(7,54,66);">var logInterval <span class="sy0" style="color:rgb(51,153,51);">= logInterval<span class="sy0" style="color:rgb(51,153,51);">? logInterval<span class="sy0" style="color:rgb(51,153,51);">: <span class="nu0" style="color:rgb(211,54,130);">600000 <span class="sy0" style="color:rgb(51,153,51);">; <span class="co1" style="font-style:italic;color:rgb(147,161,161);">//--- <span class="kw0" style="font-weight:bold;color:rgb(7,54,66);">function <span class="re0" style="color:rgb(38,139,210);">toUTCTime <span class="br0" style="color:rgb(0,153,0);">( ts<span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">{ <span class="kw0" style="font-weight:bold;color:rgb(7,54,66);">var tz <span class="sy0" style="color:rgb(51,153,51);">= d.<span class="me1" style="color:rgb(38,139,210);">getTimezoneOffset <span class="br0" style="color:rgb(0,153,0);">( <span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">/ <span class="nu0" style="color:rgb(211,54,130);">60 <span class="sy0" style="color:rgb(51,153,51);">; <span class="kw0" style="font-weight:bold;color:rgb(7,54,66);">var hour <span class="sy0" style="color:rgb(51,153,51);">= parseInt<span class="br0" style="color:rgb(0,153,0);">( ts.<span class="me1" style="color:rgb(38,139,210);">split <span class="br0" style="color:rgb(0,153,0);">( <span class="st0" style="color:rgb(42,161,152);">':' <span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">[ <span class="nu0" style="color:rgb(211,54,130);">0 <span class="br0" style="color:rgb(0,153,0);">] <span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">; <span class="kw0" style="font-weight:bold;color:rgb(7,54,66);">var UTChour <span class="sy0" style="color:rgb(51,153,51);">= hour<span class="sy0" style="color:rgb(51,153,51);">+ tz<span class="sy0" style="color:rgb(51,153,51);">; <span class="kw1" style="font-weight:bold;color:rgb(133,153,0);">if <span class="br0" style="color:rgb(0,153,0);">( UTChour<span class="sy0" style="color:rgb(51,153,51);">< <span class="nu0" style="color:rgb(211,54,130);">1 <span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">{ UTChour <span class="sy0" style="color:rgb(51,153,51);">= <span class="nu0" style="color:rgb(211,54,130);">12 <span class="sy0" style="color:rgb(51,153,51);">+ UTChour<span class="sy0" style="color:rgb(51,153,51);">; <span class="br0" style="color:rgb(0,153,0);">} <span class="kw1" style="font-weight:bold;color:rgb(133,153,0);">else <span class="kw1" style="font-weight:bold;color:rgb(133,153,0);">if <span class="br0" style="color:rgb(0,153,0);">( UTChour<span class="sy0" style="color:rgb(51,153,51);">> <span class="nu0" style="color:rgb(211,54,130);">12 <span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">{ UTChour <span class="sy0" style="color:rgb(51,153,51);">= UTChour<span class="sy0" style="color:rgb(51,153,51);">- <span class="nu0" style="color:rgb(211,54,130);">12 <span class="sy0" style="color:rgb(51,153,51);">; <span class="br0" style="color:rgb(0,153,0);">} <span class="kw0" style="font-weight:bold;color:rgb(7,54,66);">var UTCtime <span class="sy0" style="color:rgb(51,153,51);">= <span class="br0" style="color:rgb(0,153,0);">( <span class="br0" style="color:rgb(0,153,0);">( UTChour<span class="sy0" style="color:rgb(51,153,51);">+ <span class="st0" style="color:rgb(42,161,152);"> <span class="br0" style="color:rgb(0,153,0);">) .<span class="me1" style="color:rgb(38,139,210);">length <span class="sy0" style="color:rgb(51,153,51);">== <span class="nu0" style="color:rgb(211,54,130);">1 <span class="sy0" style="color:rgb(51,153,51);">? <span class="st0" style="color:rgb(42,161,152);">'0' <span class="sy0" style="color:rgb(51,153,51);">: <span class="st0" style="color:rgb(42,161,152);"> <span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">+ UTChour<span class="sy0" style="color:rgb(51,153,51);">+ <span class="st0" style="color:rgb(42,161,152);">':' <span class="sy0" style="color:rgb(51,153,51);">+ ts.<span class="me1" style="color:rgb(38,139,210);">split <span class="br0" style="color:rgb(0,153,0);">( <span class="st0" style="color:rgb(42,161,152);">':' <span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">[ <span class="nu0" style="color:rgb(211,54,130);">1 <span class="br0" style="color:rgb(0,153,0);">] <span class="sy0" style="color:rgb(51,153,51);">+ <span class="br0" style="color:rgb(0,153,0);">( ts.<span class="me1" style="color:rgb(38,139,210);">split <span class="br0" style="color:rgb(0,153,0);">( <span class="st0" style="color:rgb(42,161,152);">':' <span class="br0" style="color:rgb(0,153,0);">) .<span class="me1" style="color:rgb(38,139,210);">length <span class="sy0" style="color:rgb(51,153,51);">>= <span class="nu0" style="color:rgb(211,54,130);">3 <span class="sy0" style="color:rgb(51,153,51);">? <span class="st0" style="color:rgb(42,161,152);">':' <span class="sy0" style="color:rgb(51,153,51);">+ ts.<span class="me1" style="color:rgb(38,139,210);">split <span class="br0" style="color:rgb(0,153,0);">( <span class="st0" style="color:rgb(42,161,152);">':' <span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">[ <span class="nu0" style="color:rgb(211,54,130);">2 <span class="br0" style="color:rgb(0,153,0);">] <span class="sy0" style="color:rgb(51,153,51);">: <span class="st0" style="color:rgb(42,161,152);">'' <span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">; 	<span class="kw1" style="font-weight:bold;color:rgb(133,153,0);">return UTCtime<span class="sy0" style="color:rgb(51,153,51);">;  <span class="br0" style="color:rgb(0,153,0);">}  <span class="co1" style="font-style:italic;color:rgb(147,161,161);">//--- <span class="kw0" style="font-weight:bold;color:rgb(7,54,66);">function <span class="re0" style="color:rgb(38,139,210);">getLog <span class="br0" style="color:rgb(0,153,0);">( exists<span class="sy0" style="color:rgb(51,153,51);">, content<span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">{ <span class="co1" style="font-style:italic;color:rgb(147,161,161);">//Getting arrays with messages and senders <span class="kw0" style="font-weight:bold;color:rgb(7,54,66);">var allmsgs <span class="sy0" style="color:rgb(51,153,51);">= document.<span class="me1" style="color:rgb(38,139,210);">getElementsByClassName <span class="br0" style="color:rgb(0,153,0);">( <span class="st0" style="color:rgb(42,161,152);">'Chat' <span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">[ <span class="nu0" style="color:rgb(211,54,130);">0 <span class="br0" style="color:rgb(0,153,0);">] .<span class="me1" style="color:rgb(38,139,210);">getElementsByClassName <span class="br0" style="color:rgb(0,153,0);">( <span class="st0" style="color:rgb(42,161,152);">'message' <span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">; <span class="kw0" style="font-weight:bold;color:rgb(7,54,66);">var message <span class="sy0" style="color:rgb(51,153,51);">= allmsgs<span class="br0" style="color:rgb(0,153,0);">[ <span class="nu0" style="color:rgb(211,54,130);">0 <span class="br0" style="color:rgb(0,153,0);">] .<span class="me1" style="color:rgb(38,139,210);">innerHTML <span class="sy0" style="color:rgb(51,153,51);">; <span class="kw0" style="font-weight:bold;color:rgb(7,54,66);">var msguser <span class="sy0" style="color:rgb(51,153,51);">= allmsgs<span class="br0" style="color:rgb(0,153,0);">[ <span class="nu0" style="color:rgb(211,54,130);">0 <span class="br0" style="color:rgb(0,153,0);">] .<span class="me1" style="color:rgb(38,139,210);">parentNode .<span class="me1" style="color:rgb(38,139,210);">getAttribute <span class="br0" style="color:rgb(0,153,0);">( <span class="st0" style="color:rgb(42,161,152);">'data-user' <span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">; <span class="kw0" style="font-weight:bold;color:rgb(7,54,66);">var msgtime <span class="sy0" style="color:rgb(51,153,51);">= toUTCTime<span class="br0" style="color:rgb(0,153,0);">( allmsgs<span class="br0" style="color:rgb(0,153,0);">[ <span class="nu0" style="color:rgb(211,54,130);">0 <span class="br0" style="color:rgb(0,153,0);">] .<span class="me1" style="color:rgb(38,139,210);">parentNode .<span class="me1" style="color:rgb(38,139,210);">getElementsByClassName <span class="br0" style="color:rgb(0,153,0);">( <span class="st0" style="color:rgb(42,161,152);">'time' <span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">[ <span class="nu0" style="color:rgb(211,54,130);">0 <span class="br0" style="color:rgb(0,153,0);">] .<span class="me1" style="color:rgb(38,139,210);">innerHTML <span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">; <span class="kw1" style="font-weight:bold;color:rgb(133,153,0);">for <span class="br0" style="color:rgb(0,153,0);">( i<span class="sy0" style="color:rgb(51,153,51);">= <span class="nu0" style="color:rgb(211,54,130);">1 <span class="sy0" style="color:rgb(51,153,51);">; allmsgs<span class="br0" style="color:rgb(0,153,0);">[ i<span class="br0" style="color:rgb(0,153,0);">] <span class="sy0" style="color:rgb(51,153,51);">; i<span class="sy0" style="color:rgb(51,153,51);">++ <span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">{ message <span class="sy0" style="color:rgb(51,153,51);">+= <span class="st0" style="color:rgb(42,161,152);">'<|>' <span class="sy0" style="color:rgb(51,153,51);">+ allmsgs<span class="br0" style="color:rgb(0,153,0);">[ i<span class="br0" style="color:rgb(0,153,0);">] .<span class="me1" style="color:rgb(38,139,210);">innerHTML <span class="sy0" style="color:rgb(51,153,51);">; msguser <span class="sy0" style="color:rgb(51,153,51);">+= <span class="st0" style="color:rgb(42,161,152);">'<|>' <span class="sy0" style="color:rgb(51,153,51);">+ allmsgs<span class="br0" style="color:rgb(0,153,0);">[ i<span class="br0" style="color:rgb(0,153,0);">] .<span class="me1" style="color:rgb(38,139,210);">parentNode .<span class="me1" style="color:rgb(38,139,210);">getAttribute <span class="br0" style="color:rgb(0,153,0);">( <span class="st0" style="color:rgb(42,161,152);">'data-user' <span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">; msgtime <span class="sy0" style="color:rgb(51,153,51);">+= <span class="st0" style="color:rgb(42,161,152);">'<|>' <span class="sy0" style="color:rgb(51,153,51);">+ toUTCTime<span class="br0" style="color:rgb(0,153,0);">( allmsgs<span class="br0" style="color:rgb(0,153,0);">[ i<span class="br0" style="color:rgb(0,153,0);">] .<span class="me1" style="color:rgb(38,139,210);">parentNode .<span class="me1" style="color:rgb(38,139,210);">getElementsByClassName <span class="br0" style="color:rgb(0,153,0);">( <span class="st0" style="color:rgb(42,161,152);">'time' <span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">[ <span class="nu0" style="color:rgb(211,54,130);">0 <span class="br0" style="color:rgb(0,153,0);">] .<span class="me1" style="color:rgb(38,139,210);">innerHTML <span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">; <span class="br0" style="color:rgb(0,153,0);">} message <span class="sy0" style="color:rgb(51,153,51);">= message.<span class="me1" style="color:rgb(38,139,210);">split <span class="br0" style="color:rgb(0,153,0);">( <span class="st0" style="color:rgb(42,161,152);">'<|>' <span class="br0" style="color:rgb(0,153,0);">) msguser <span class="sy0" style="color:rgb(51,153,51);">= msguser.<span class="me1" style="color:rgb(38,139,210);">split <span class="br0" style="color:rgb(0,153,0);">( <span class="st0" style="color:rgb(42,161,152);">'<|>' <span class="br0" style="color:rgb(0,153,0);">) msgtime <span class="sy0" style="color:rgb(51,153,51);">= msgtime.<span class="me1" style="color:rgb(38,139,210);">split <span class="br0" style="color:rgb(0,153,0);">( <span class="st0" style="color:rgb(42,161,152);">'<|>' <span class="br0" style="color:rgb(0,153,0);">) <span class="co1" style="font-style:italic;color:rgb(147,161,161);">//Turning the format into a log instead of arrays <span class="kw0" style="font-weight:bold;color:rgb(7,54,66);">var ChatLog<span class="sy0" style="color:rgb(51,153,51);">= <span class="st0" style="color:rgb(42,161,152);">'' <span class="sy0" style="color:rgb(51,153,51);">; <span class="kw1" style="font-weight:bold;color:rgb(133,153,0);">for <span class="br0" style="color:rgb(0,153,0);">( i<span class="sy0" style="color:rgb(51,153,51);">= <span class="nu0" style="color:rgb(211,54,130);">0 <span class="sy0" style="color:rgb(51,153,51);">; message<span class="br0" style="color:rgb(0,153,0);">[ i<span class="br0" style="color:rgb(0,153,0);">] <span class="sy0" style="color:rgb(51,153,51);">; i<span class="sy0" style="color:rgb(51,153,51);">++ <span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">{ ChatLog <span class="sy0" style="color:rgb(51,153,51);">+= <span class="st0" style="color:rgb(42,161,152);">'[' <span class="sy0" style="color:rgb(51,153,51);">+ msgtime<span class="br0" style="color:rgb(0,153,0);">[ i<span class="br0" style="color:rgb(0,153,0);">] <span class="sy0" style="color:rgb(51,153,51);">+ <span class="st0" style="color:rgb(42,161,152);">'] <' <span class="sy0" style="color:rgb(51,153,51);">+ msguser<span class="br0" style="color:rgb(0,153,0);">[ i<span class="br0" style="color:rgb(0,153,0);">] <span class="sy0" style="color:rgb(51,153,51);">+ <span class="st0" style="color:rgb(42,161,152);">'> ' <span class="sy0" style="color:rgb(51,153,51);">+ message<span class="br0" style="color:rgb(0,153,0);">[ i<span class="br0" style="color:rgb(0,153,0);">] <span class="sy0" style="color:rgb(51,153,51);">+ <span class="st0" style="color:rgb(42,161,152);">'<span class="es0" style="font-weight:bold;color:rgb(0,0,153);">\n ' <span class="br0" style="color:rgb(0,153,0);">} <span class="kw1" style="font-weight:bold;color:rgb(133,153,0);">while <span class="br0" style="color:rgb(0,153,0);">( ChatLog.<span class="me1" style="color:rgb(38,139,210);">match <span class="br0" style="color:rgb(0,153,0);">( <span class="co2" style="font-style:italic;color:rgb(147,161,161);">/\n[^\[]/ <span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">{ ChatLog <span class="sy0" style="color:rgb(51,153,51);">= ChatLog.<span class="me1" style="color:rgb(38,139,210);">replace <span class="br0" style="color:rgb(0,153,0);">( <span class="co2" style="font-style:italic;color:rgb(147,161,161);">/\[(\d\d?:\d\d)\] <([^>]*)> (.*)\n([^\[<])/g <span class="sy0" style="color:rgb(51,153,51);">, <span class="st0" style="color:rgb(42,161,152);">'[$1] <$2> $3<span class="es0" style="font-weight:bold;color:rgb(0,0,153);">\n [$1] <$2> $4' <span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">} <span class="kw0" style="font-weight:bold;color:rgb(7,54,66);">var wikilinks <span class="sy0" style="color:rgb(51,153,51);">= <span class="kw1" style="font-weight:bold;color:rgb(133,153,0);">new RegExp<span class="br0" style="color:rgb(0,153,0);">( <span class="st0" style="color:rgb(42,161,152);">'<a href="' <span class="sy0" style="color:rgb(51,153,51);">+ wgServer<span class="sy0" style="color:rgb(51,153,51);">+ <span class="st0" style="color:rgb(42,161,152);">'/wiki/([^"]*)">([^<]*)</a>' <span class="sy0" style="color:rgb(51,153,51);">, <span class="st0" style="color:rgb(42,161,152);">'g' <span class="br0" style="color:rgb(0,153,0);">) 	ChatLog <span class="sy0" style="color:rgb(51,153,51);">= ChatLog.<span class="me1" style="color:rgb(38,139,210);">replace <span class="br0" style="color:rgb(0,153,0);">( <span class="co2" style="font-style:italic;color:rgb(147,161,161);">/( |	){2,}/g <span class="sy0" style="color:rgb(51,153,51);">, <span class="st0" style="color:rgb(42,161,152);">' ' <span class="br0" style="color:rgb(0,153,0);">) .<span class="me1" style="color:rgb(38,139,210);">replace <span class="br0" style="color:rgb(0,153,0);">( <span class="co2" style="font-style:italic;color:rgb(147,161,161);">/<img src="[^"]+".*?alt="([^"]+)"[^>]*>/g <span class="sy0" style="color:rgb(51,153,51);">, <span class="st0" style="color:rgb(42,161,152);">'$1' <span class="br0" style="color:rgb(0,153,0);">) .<span class="me1" style="color:rgb(38,139,210);">replace <span class="br0" style="color:rgb(0,153,0);">( wikilinks<span class="sy0" style="color:rgb(51,153,51);">, <span class="kw0" style="font-weight:bold;color:rgb(7,54,66);">function <span class="br0" style="color:rgb(0,153,0);">( match<span class="sy0" style="color:rgb(51,153,51);">, page<span class="sy0" style="color:rgb(51,153,51);">, title<span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">{ <span class="kw1" style="font-weight:bold;color:rgb(133,153,0);">return <span class="st0" style="color:rgb(42,161,152);"> <span class="sy0" style="color:rgb(51,153,51);">+ title<span class="sy0" style="color:rgb(51,153,51);">+ <span class="st0" style="color:rgb(42,161,152);"> <span class="br0" style="color:rgb(0,153,0);">} <span class="br0" style="color:rgb(0,153,0);">) .<span class="me1" style="color:rgb(38,139,210);">replace <span class="br0" style="color:rgb(0,153,0);">( <span class="co2" style="font-style:italic;color:rgb(147,161,161);">/\[\[([^\]]*?) {2,}/g <span class="sy0" style="color:rgb(51,153,51);">, <span class="st0" style="color:rgb(42,161,152);">']*)\|\1/g <span class="sy0" style="color:rgb(51,153,51);">, <span class="st0" style="color:rgb(42,161,152);">'$1' <span class="br0" style="color:rgb(0,153,0);">) .<span class="me1" style="color:rgb(38,139,210);">replace <span class="br0" style="color:rgb(0,153,0);">( <span class="co2" style="font-style:italic;color:rgb(147,161,161);">/<a href="([^"]+)">[^<]*<\/a>/g <span class="sy0" style="color:rgb(51,153,51);">, <span class="st0" style="color:rgb(42,161,152);">'$1' <span class="br0" style="color:rgb(0,153,0);">) .<span class="me1" style="color:rgb(38,139,210);">replace <span class="br0" style="color:rgb(0,153,0);">( <span class="st0" style="color:rgb(42,161,152);">'|' <span class="sy0" style="color:rgb(51,153,51);">+ wgServer<span class="sy0" style="color:rgb(51,153,51);">+ <span class="st0" style="color:rgb(42,161,152);">'/wiki/' <span class="sy0" style="color:rgb(51,153,51);">, wgServer<span class="sy0" style="color:rgb(51,153,51);">+ <span class="st0" style="color:rgb(42,161,152);">'/wiki/' <span class="br0" style="color:rgb(0,153,0);">) <span class="co1" style="font-style:italic;color:rgb(147,161,161);">//HTML img and a tag fixes active<span class="br0" style="color:rgb(0,153,0);">( <span class="br0" style="color:rgb(0,153,0);">) .<span class="me1" style="color:rgb(38,139,210);">clearWindow <span class="br0" style="color:rgb(0,153,0);">( <span class="br0" style="color:rgb(0,153,0);">) <span class="kw0" style="font-weight:bold;color:rgb(7,54,66);">var returnThis <span class="sy0" style="color:rgb(51,153,51);">= exists<span class="sy0" style="color:rgb(51,153,51);">? content.<span class="me1" style="color:rgb(38,139,210);">replace <span class="br0" style="color:rgb(0,153,0);">( <span class="st0" style="color:rgb(42,161,152);">' ' <span class="sy0" style="color:rgb(51,153,51);">, ChatLog<span class="sy0" style="color:rgb(51,153,51);">+ <span class="st0" style="color:rgb(42,161,152);">' ' <span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">: <span class="st0" style="color:rgb(42,161,152);">'<pre class="ChatLog"><span class="es0" style="font-weight:bold;color:rgb(0,0,153);">\n ' <span class="sy0" style="color:rgb(51,153,51);">+ ChatLog<span class="sy0" style="color:rgb(51,153,51);">+ <span class="st0" style="color:rgb(42,161,152);">' <span class="es0" style="font-weight:bold;color:rgb(0,0,153);">\n ' <span class="kw1" style="font-weight:bold;color:rgb(133,153,0);">return returnThis <span class="br0" style="color:rgb(0,153,0);">} <span class="co1" style="font-style:italic;color:rgb(147,161,161);">//--- <span class="kw0" style="font-weight:bold;color:rgb(7,54,66);">function <span class="re0" style="color:rgb(38,139,210);">callAPI <span class="br0" style="color:rgb(0,153,0);">( data<span class="sy0" style="color:rgb(51,153,51);">, method<span class="sy0" style="color:rgb(51,153,51);">, callback<span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">{ data<span class="br0" style="color:rgb(0,153,0);">[ <span class="st0" style="color:rgb(42,161,152);">'format' <span class="br0" style="color:rgb(0,153,0);">] <span class="sy0" style="color:rgb(51,153,51);">= <span class="st0" style="color:rgb(42,161,152);">'json' <span class="sy0" style="color:rgb(51,153,51);">; <span class="kw1" style="font-weight:bold;color:rgb(133,153,0);">$ .<span class="me1" style="color:rgb(38,139,210);">ajax <span class="br0" style="color:rgb(0,153,0);">( <span class="br0" style="color:rgb(0,153,0);">{ 		data<span class="sy0" style="color:rgb(51,153,51);">: data<span class="sy0" style="color:rgb(51,153,51);">,  		dataType<span class="sy0" style="color:rgb(51,153,51);">: <span class="st0" style="color:rgb(42,161,152);">'json' <span class="sy0" style="color:rgb(51,153,51);">,  		url<span class="sy0" style="color:rgb(51,153,51);">: wgScriptPath <span class="sy0" style="color:rgb(51,153,51);">+ <span class="st0" style="color:rgb(42,161,152);">'/api.php' <span class="sy0" style="color:rgb(51,153,51);">,  		type<span class="sy0" style="color:rgb(51,153,51);">: method<span class="sy0" style="color:rgb(51,153,51);">,  		success<span class="sy0" style="color:rgb(51,153,51);">: <span class="kw0" style="font-weight:bold;color:rgb(7,54,66);">function <span class="br0" style="color:rgb(0,153,0);">( response<span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">{ <span class="kw1" style="font-weight:bold;color:rgb(133,153,0);">if <span class="br0" style="color:rgb(0,153,0);">( response.<span class="me1" style="color:rgb(38,139,210);">error <span class="br0" style="color:rgb(0,153,0);">) showError<span class="br0" style="color:rgb(0,153,0);">( <span class="st0" style="color:rgb(42,161,152);">'API error: ' <span class="sy0" style="color:rgb(51,153,51);">+ response.<span class="me1" style="color:rgb(38,139,210);">error .<span class="me1" style="color:rgb(38,139,210);">info <span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">; <span class="kw1" style="font-weight:bold;color:rgb(133,153,0);">else callback<span class="br0" style="color:rgb(0,153,0);">( response<span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">; <span class="br0" style="color:rgb(0,153,0);">} <span class="sy0" style="color:rgb(51,153,51);">, error<span class="sy0" style="color:rgb(51,153,51);">: <span class="kw0" style="font-weight:bold;color:rgb(7,54,66);">function <span class="br0" style="color:rgb(0,153,0);">( xhr<span class="sy0" style="color:rgb(51,153,51);">, error<span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">{ showError<span class="br0" style="color:rgb(0,153,0);">( <span class="st0" style="color:rgb(42,161,152);">'AJAX error: ' <span class="sy0" style="color:rgb(51,153,51);">+ error<span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">; <span class="br0" style="color:rgb(0,153,0);">} <span class="br0" style="color:rgb(0,153,0);">} <span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">; <span class="br0" style="color:rgb(0,153,0);">}  <span class="co1" style="font-style:italic;color:rgb(147,161,161);">//---  <span class="kw0" style="font-weight:bold;color:rgb(7,54,66);">function <span class="re0" style="color:rgb(38,139,210);">submitLog <span class="br0" style="color:rgb(0,153,0);">( restart<span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">{  	restart <span class="sy0" style="color:rgb(51,153,51);">= restart<span class="sy0" style="color:rgb(51,153,51);">? restart<span class="sy0" style="color:rgb(51,153,51);">: <span class="kw2" style="font-weight:bold;color:rgb(181,137,0);">false <span class="sy0" style="color:rgb(51,153,51);">;  	<span class="kw0" style="font-weight:bold;color:rgb(7,54,66);">var d <span class="sy0" style="color:rgb(51,153,51);">= <span class="kw1" style="font-weight:bold;color:rgb(133,153,0);">new Date<span class="br0" style="color:rgb(0,153,0);">( <span class="br0" style="color:rgb(0,153,0);">) <span class="kw0" style="font-weight:bold;color:rgb(7,54,66);">var monthNames <span class="sy0" style="color:rgb(51,153,51);">= <span class="br0" style="color:rgb(0,153,0);">[ <span class="st0" style="color:rgb(42,161,152);">"January" <span class="sy0" style="color:rgb(51,153,51);">, <span class="st0" style="color:rgb(42,161,152);">"February" <span class="sy0" style="color:rgb(51,153,51);">, <span class="st0" style="color:rgb(42,161,152);">"March" <span class="sy0" style="color:rgb(51,153,51);">, <span class="st0" style="color:rgb(42,161,152);">"April" <span class="sy0" style="color:rgb(51,153,51);">, <span class="st0" style="color:rgb(42,161,152);">"May" <span class="sy0" style="color:rgb(51,153,51);">, <span class="st0" style="color:rgb(42,161,152);">"June" <span class="sy0" style="color:rgb(51,153,51);">, <span class="st0" style="color:rgb(42,161,152);">"July" <span class="sy0" style="color:rgb(51,153,51);">, <span class="st0" style="color:rgb(42,161,152);">"August" <span class="sy0" style="color:rgb(51,153,51);">, <span class="st0" style="color:rgb(42,161,152);">"September" <span class="sy0" style="color:rgb(51,153,51);">, <span class="st0" style="color:rgb(42,161,152);">"October" <span class="sy0" style="color:rgb(51,153,51);">, <span class="st0" style="color:rgb(42,161,152);">"November" <span class="sy0" style="color:rgb(51,153,51);">, <span class="st0" style="color:rgb(42,161,152);">"December" <span class="br0" style="color:rgb(0,153,0);">] <span class="sy0" style="color:rgb(51,153,51);">; <span class="kw0" style="font-weight:bold;color:rgb(7,54,66);">var date <span class="sy0" style="color:rgb(51,153,51);">= d.<span class="me1" style="color:rgb(38,139,210);">getUTCDate <span class="br0" style="color:rgb(0,153,0);">( <span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">+ <span class="st0" style="color:rgb(42,161,152);">'_' <span class="sy0" style="color:rgb(51,153,51);">+ monthNames<span class="br0" style="color:rgb(0,153,0);">[ d.<span class="me1" style="color:rgb(38,139,210);">getUTCMonth <span class="br0" style="color:rgb(0,153,0);">( <span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">] <span class="sy0" style="color:rgb(51,153,51);">+ <span class="st0" style="color:rgb(42,161,152);">'_' <span class="sy0" style="color:rgb(51,153,51);">+ d.<span class="me1" style="color:rgb(38,139,210);">getUTCFullYear <span class="br0" style="color:rgb(0,153,0);">( <span class="br0" style="color:rgb(0,153,0);">) callAPI<span class="br0" style="color:rgb(0,153,0);">( <span class="br0" style="color:rgb(0,153,0);">{ 		<span class="st0" style="color:rgb(42,161,152);">'action' <span class="sy0" style="color:rgb(51,153,51);">: <span class="st0" style="color:rgb(42,161,152);">'query' <span class="sy0" style="color:rgb(51,153,51);">,  		<span class="st0" style="color:rgb(42,161,152);">'prop' <span class="sy0" style="color:rgb(51,153,51);">: <span class="st0" style="color:rgb(42,161,152);">'info|revisions' <span class="sy0" style="color:rgb(51,153,51);">,  		<span class="st0" style="color:rgb(42,161,152);">'intoken' <span class="sy0" style="color:rgb(51,153,51);">: <span class="st0" style="color:rgb(42,161,152);">'edit' <span class="sy0" style="color:rgb(51,153,51);">,  		<span class="st0" style="color:rgb(42,161,152);">'titles' <span class="sy0" style="color:rgb(51,153,51);">: <span class="st0" style="color:rgb(42,161,152);">'Project:Chat/Logs/' <span class="sy0" style="color:rgb(51,153,51);">+ date<span class="sy0" style="color:rgb(51,153,51);">, <span class="st0" style="color:rgb(42,161,152);">'rvprop' <span class="sy0" style="color:rgb(51,153,51);">: <span class="st0" style="color:rgb(42,161,152);">'content' <span class="sy0" style="color:rgb(51,153,51);">, <span class="st0" style="color:rgb(42,161,152);">'rvlimit' <span class="sy0" style="color:rgb(51,153,51);">: <span class="st0" style="color:rgb(42,161,152);">'1' <span class="sy0" style="color:rgb(51,153,51);">, <span class="st0" style="color:rgb(42,161,152);">'indexpageids' <span class="sy0" style="color:rgb(51,153,51);">: <span class="st0" style="color:rgb(42,161,152);">'true' <span class="sy0" style="color:rgb(51,153,51);">, <span class="br0" style="color:rgb(0,153,0);">} <span class="sy0" style="color:rgb(51,153,51);">, <span class="st0" style="color:rgb(42,161,152);">'GET' <span class="sy0" style="color:rgb(51,153,51);">, <span class="kw0" style="font-weight:bold;color:rgb(7,54,66);">function <span class="br0" style="color:rgb(0,153,0);">( response<span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">{ <span class="kw0" style="font-weight:bold;color:rgb(7,54,66);">var page <span class="sy0" style="color:rgb(51,153,51);">= response.<span class="me1" style="color:rgb(38,139,210);">query .<span class="me1" style="color:rgb(38,139,210);">pages <span class="br0" style="color:rgb(0,153,0);">[ response.<span class="me1" style="color:rgb(38,139,210);">query .<span class="me1" style="color:rgb(38,139,210);">pageids <span class="br0" style="color:rgb(0,153,0);">[ <span class="nu0" style="color:rgb(211,54,130);">0 <span class="br0" style="color:rgb(0,153,0);">] <span class="br0" style="color:rgb(0,153,0);">] <span class="sy0" style="color:rgb(51,153,51);">; <span class="kw0" style="font-weight:bold;color:rgb(7,54,66);">var pageExists <span class="sy0" style="color:rgb(51,153,51);">= response.<span class="me1" style="color:rgb(38,139,210);">query .<span class="me1" style="color:rgb(38,139,210);">pages <span class="br0" style="color:rgb(0,153,0);">[ <span class="st0" style="color:rgb(42,161,152);">"-1" <span class="br0" style="color:rgb(0,153,0);">] <span class="sy0" style="color:rgb(51,153,51);">? <span class="kw2" style="font-weight:bold;color:rgb(181,137,0);">false <span class="sy0" style="color:rgb(51,153,51);">: <span class="kw2" style="font-weight:bold;color:rgb(181,137,0);">true <span class="sy0" style="color:rgb(51,153,51);">; <span class="kw0" style="font-weight:bold;color:rgb(7,54,66);">var content <span class="sy0" style="color:rgb(51,153,51);">= <span class="kw1" style="font-weight:bold;color:rgb(133,153,0);">typeof <span class="br0" style="color:rgb(0,153,0);">( page<span class="br0" style="color:rgb(0,153,0);">[ <span class="st0" style="color:rgb(42,161,152);">"revisions" <span class="br0" style="color:rgb(0,153,0);">] <span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">!= <span class="st0" style="color:rgb(42,161,152);">"undefined" <span class="sy0" style="color:rgb(51,153,51);">? page.<span class="me1" style="color:rgb(38,139,210);">revisions <span class="br0" style="color:rgb(0,153,0);">[ <span class="nu0" style="color:rgb(211,54,130);">0 <span class="br0" style="color:rgb(0,153,0);">] <span class="br0" style="color:rgb(0,153,0);">[ <span class="st0" style="color:rgb(42,161,152);">'*' <span class="br0" style="color:rgb(0,153,0);">] <span class="sy0" style="color:rgb(51,153,51);">: <span class="st0" style="color:rgb(42,161,152);">'' <span class="sy0" style="color:rgb(51,153,51);">; callAPI<span class="br0" style="color:rgb(0,153,0);">( <span class="br0" style="color:rgb(0,153,0);">{ 			<span class="st0" style="color:rgb(42,161,152);">'minor' <span class="sy0" style="color:rgb(51,153,51);">: <span class="st0" style="color:rgb(42,161,152);">'yes' <span class="sy0" style="color:rgb(51,153,51);">,  			<span class="st0" style="color:rgb(42,161,152);">'bot' <span class="sy0" style="color:rgb(51,153,51);">: <span class="st0" style="color:rgb(42,161,152);">'yes' <span class="sy0" style="color:rgb(51,153,51);">,  			<span class="st0" style="color:rgb(42,161,152);">'summary' <span class="sy0" style="color:rgb(51,153,51);">: <span class="st0" style="color:rgb(42,161,152);">'Adding to chatlog using ChatLogger script' <span class="sy0" style="color:rgb(51,153,51);">, <span class="st0" style="color:rgb(42,161,152);">'action' <span class="sy0" style="color:rgb(51,153,51);">: <span class="st0" style="color:rgb(42,161,152);">'edit' <span class="sy0" style="color:rgb(51,153,51);">, <span class="st0" style="color:rgb(42,161,152);">'title' <span class="sy0" style="color:rgb(51,153,51);">: <span class="st0" style="color:rgb(42,161,152);">'Project:Chat/Logs/' <span class="sy0" style="color:rgb(51,153,51);">+ date<span class="sy0" style="color:rgb(51,153,51);">, <span class="st0" style="color:rgb(42,161,152);">'startimestamp' <span class="sy0" style="color:rgb(51,153,51);">: page.<span class="me1" style="color:rgb(38,139,210);">starttimestamp <span class="sy0" style="color:rgb(51,153,51);">, <span class="st0" style="color:rgb(42,161,152);">'token' <span class="sy0" style="color:rgb(51,153,51);">: page.<span class="me1" style="color:rgb(38,139,210);">edittoken <span class="sy0" style="color:rgb(51,153,51);">, <span class="st0" style="color:rgb(42,161,152);">'text' <span class="sy0" style="color:rgb(51,153,51);">: getLog<span class="br0" style="color:rgb(0,153,0);">( pageExists<span class="sy0" style="color:rgb(51,153,51);">, content<span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">} <span class="sy0" style="color:rgb(51,153,51);">, <span class="st0" style="color:rgb(42,161,152);">'POST' <span class="sy0" style="color:rgb(51,153,51);">, <span class="kw0" style="font-weight:bold;color:rgb(7,54,66);">function <span class="br0" style="color:rgb(0,153,0);">( response<span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">{ restart<span class="sy0" style="color:rgb(51,153,51);">? restartChat<span class="br0" style="color:rgb(0,153,0);">( <span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">: <span class="st0" style="color:rgb(42,161,152);">'' <span class="sy0" style="color:rgb(51,153,51);">; <span class="br0" style="color:rgb(0,153,0);">} <span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">; 	<span class="br0" style="color:rgb(0,153,0);">} <span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">; <span class="br0" style="color:rgb(0,153,0);">} setInterval<span class="br0" style="color:rgb(0,153,0);">( <span class="st0" style="color:rgb(42,161,152);">'submitLog' <span class="sy0" style="color:rgb(51,153,51);">, logInterval<span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">} 3. Clear your cache by pressing Ctrl+F5 (Chrome, Firefox and Explorer), go to Tools, then Preferences, then find the option that tells you to clear your cache (Opera) or simple Refresh (Safari, Konquerer)

4. Go to chat.

5. Enable Chat Hacks

6. Click submit at your will

7. ???

8. Profit

Ending
Congratulations! You know how to log chat! However, in doing so, the chat MIGHT auto log itself, and once you log chat, the chat will be cleared. Anyways, good luck to logging chat, users!