User:Joeytje50/chat.js

$(window).load(function { console.log('Special:MyPage/chat.js') /*Script that makes it easy to run functions when receiving messages*/ importScriptPage('MediaWiki:Chat.js/newmessage.js','runescape'); importScriptPage('User:Joeytje50/chatmsg.js','runescape'); $('head').append('\n\n\n\n'); function pad(n) {//Function to pad the timestamps with zeroes where needed	return (n<10?'0':'') + n; } onchatmessage = function (text, rawtext) {	//Scripts to run when you get a new message	setTimeout(function { var e = $('#WikiaPage li.inline-alert:last-child:not(:has(span.time))'), d, time; if (e.length) { d = new Date; time = pad(d.getHours)+':'+pad(d.getMinutes)+':'+pad(d.getSeconds); e.prepend(' [ '+time+' ]  '); }	},20);	return text; //DO NOT EDIT THIS LINE }; });