mirror of https://github.com/calzoneman/sync.git
Show timestamps on continued messages
This commit is contained in:
parent
ab2118da48
commit
bafce39107
|
@ -183,16 +183,13 @@ function addChatMessage(data) {
|
|||
|
||||
function formatChatMessage(data) {
|
||||
var skip = data.username == LASTCHATNAME;
|
||||
if(Date.now() > LASTCHATTIME + 60000) {
|
||||
skip = false;
|
||||
}
|
||||
if(data.msgclass == "drink" || data.msgclass == "shout") {
|
||||
skip = false;
|
||||
}
|
||||
LASTCHATNAME = data.username;
|
||||
LASTCHATTIME = data.time;
|
||||
var div = $("<div/>");
|
||||
if(USEROPTS.show_timestamps && !skip) {
|
||||
if(USEROPTS.show_timestamps) {
|
||||
var time = $("<span/>").addClass("timestamp").appendTo(div);
|
||||
var timestamp = new Date(data.time).toTimeString().split(" ")[0];
|
||||
time.text("["+timestamp+"] ");
|
||||
|
|
Loading…
Reference in New Issue