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) {
|
function formatChatMessage(data) {
|
||||||
var skip = data.username == LASTCHATNAME;
|
var skip = data.username == LASTCHATNAME;
|
||||||
if(Date.now() > LASTCHATTIME + 60000) {
|
|
||||||
skip = false;
|
|
||||||
}
|
|
||||||
if(data.msgclass == "drink" || data.msgclass == "shout") {
|
if(data.msgclass == "drink" || data.msgclass == "shout") {
|
||||||
skip = false;
|
skip = false;
|
||||||
}
|
}
|
||||||
LASTCHATNAME = data.username;
|
LASTCHATNAME = data.username;
|
||||||
LASTCHATTIME = data.time;
|
LASTCHATTIME = data.time;
|
||||||
var div = $("<div/>");
|
var div = $("<div/>");
|
||||||
if(USEROPTS.show_timestamps && !skip) {
|
if(USEROPTS.show_timestamps) {
|
||||||
var time = $("<span/>").addClass("timestamp").appendTo(div);
|
var time = $("<span/>").addClass("timestamp").appendTo(div);
|
||||||
var timestamp = new Date(data.time).toTimeString().split(" ")[0];
|
var timestamp = new Date(data.time).toTimeString().split(" ")[0];
|
||||||
time.text("["+timestamp+"] ");
|
time.text("["+timestamp+"] ");
|
||||||
|
|
Loading…
Reference in New Issue