User:BryghtShadow/ChatTimetamps.js

console.log("ChatTimetamps.js: r"+wgCurRevisionId); // Apply timestamps to inline alerts in chat if (wgCanonicalSpecialPageName=="Chat" && skin=="oasis") {

//---

var d = new Date; var curTime = [,,'']; curTime[0] = d.getUTCHours; curTime[1] = d.getUTCMinutes; curTime[2] = d.getUTCSeconds;

//--- function toUTCTime(ts) { var tz = d.getTimezoneOffset/60; var hour = parseInt(ts.split(':')[0]); var UTChour = hour+tz; if (UTChour<1) { UTChour = 12+UTChour; } else if (UTChour>12) { UTChour = UTChour-12; }	var UTCtime = ((UTChour+).length==1?'0':)+UTChour+':'+ts.split(':')[1]+(ts.split(':').length>=3?':'+ts.split(':')[2]:''); return UTCtime; } //---

function applyTimestamp { d = new Date; //	curTime[0] = d.getUTCHours; //	curTime[1] = d.getUTCMinutes; //	curTime[2] = d.getUTCSeconds;

$('.inline-alert:not(:has(span))').append(' ' + d.getHours+":"+d.getMinutes + ' '); console.log("ChatTimetamps.js: timestamp:" + d.toUTCString + "."); } //---

setInterval("applyTimestamp", 1000); applyTimestamp;

}