commento.js: use full timestamp in timeago title

This commit is contained in:
Adhityaa Chandrasekar 2019-03-02 14:30:12 -05:00
parent d26b6f6e9f
commit 295318e6a6

View File

@ -690,6 +690,7 @@
} else { } else {
name = create("div"); name = create("div");
} }
var date = new Date(comment.creationDate);
card.id = ID_CARD + comment.commentHex; card.id = ID_CARD + comment.commentHex;
body.id = ID_BODY + comment.commentHex; body.id = ID_BODY + comment.commentHex;
@ -728,11 +729,12 @@
} else { } else {
sticky.title = "Sticky"; sticky.title = "Sticky";
} }
timeago.title = date.toString();
card.style["borderLeft"] = "2px solid " + color; card.style["borderLeft"] = "2px solid " + color;
name.innerText = commenter.name; name.innerText = commenter.name;
text.innerHTML = comment.html; text.innerHTML = comment.html;
timeago.innerHTML = timeDifference((new Date()).getTime(), Date.parse(comment.creationDate)); timeago.innerHTML = timeDifference((new Date()).getTime(), date);
score.innerText = scorify(comment.score); score.innerText = scorify(comment.score);
if (commenter.photo === "undefined") { if (commenter.photo === "undefined") {