From 35f2100cf3a1bdec45d3173c6b937037041a165c Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Wed, 29 Sep 2021 19:10:24 +0200 Subject: [PATCH] df --- .../js/{new_comments_count.js => new_comments_count2.js} | 4 +++- files/templates/comments.html | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) rename files/assets/js/{new_comments_count.js => new_comments_count2.js} (96%) diff --git a/files/assets/js/new_comments_count.js b/files/assets/js/new_comments_count2.js similarity index 96% rename from files/assets/js/new_comments_count.js rename to files/assets/js/new_comments_count2.js index db2e288cc..923f11c96 100644 --- a/files/assets/js/new_comments_count.js +++ b/files/assets/js/new_comments_count2.js @@ -31,7 +31,9 @@ if (typeof showNewCommentCounts === 'undefined') { const newTotal = lastTotalComs || ((comments[postId] || { c: 0 }).c + 1) - comments[postId] = { c: newTotal, t: Date.now() } + var t = Date.now() + + comments[postId] = { c: newTotal, t: (t-(t%1000))/1000 } window.localStorage.setItem("comment-counts", JSON.stringify(comments)) } diff --git a/files/templates/comments.html b/files/templates/comments.html index 4f900c802..b7ef20e48 100644 --- a/files/templates/comments.html +++ b/files/templates/comments.html @@ -35,7 +35,7 @@ {% endif %} - +