This commit is contained in:
Aevann1 2021-09-29 19:10:24 +02:00
parent a47ee72807
commit 35f2100cf3
2 changed files with 4 additions and 2 deletions

View file

@ -31,7 +31,9 @@ if (typeof showNewCommentCounts === 'undefined') {
const newTotal = lastTotalComs || ((comments[postId] || { c: 0 }).c + 1) 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)) window.localStorage.setItem("comment-counts", JSON.stringify(comments))
} }

View file

@ -35,7 +35,7 @@
<script src="/assets/js/comments_admin.js"></script> <script src="/assets/js/comments_admin.js"></script>
{% endif %} {% endif %}
<script src="/assets/js/new_comments_count.js"></script> <script src="/assets/js/new_comments_count2.js"></script>
<script> <script>
function collapse_comment(comment_id) { function collapse_comment(comment_id) {