Make more JSonic

This commit is contained in:
justcool393 2023-07-22 13:49:19 -05:00
parent 1a407090d9
commit 577521f7c4
2 changed files with 7 additions and 9 deletions

View file

@ -201,6 +201,7 @@
<script src="{{ 'js/comments+submission_listing.js' | asset }}"></script>
<script src="{{ 'js/comments.js' | asset }}"></script>
{# See #}
<script>
{% if p and (not v or v.highlightcomments) %}
comments = JSON.parse(localStorage.getItem("comment-counts")) || {}
@ -213,9 +214,8 @@
{% endfor %}
];
commentsToCheck = commentsToCheck.filter(comment => {
return comment[1] > lastCount.t
}).map(comment => comment[0]);
commentsToCheck = commentsToCheck.filter(comment => comment[1] > lastCount.t)
.map(comment => comment[0]);
if (lastCount) commentsAddUnreadIndicator(commentsToCheck);
{% endif %}
@ -259,9 +259,8 @@
{% endfor %}
];
commentsToCheck = commentsToCheck.filter(comment => {
return comment[1] > lastCount.t
}).map(comment => comment[0]);
commentsToCheck = commentsToCheck.filter(comment => comment[1] > lastCount.t)
.map(comment => comment[0]);
if (lastCount) commentsAddUnreadIndicator(commentsToCheck);
{% endif %}

View file

@ -498,9 +498,8 @@
{% endfor %}
];
commentsToCheck = commentsToCheck.filter(comment => {
return comment[1] > lastCount.t
}).map(comment => comment[0]);
commentsToCheck = commentsToCheck.filter(comment => comment[1] > lastCount.t)
.map(comment => comment[0]);
if (lastCount) commentsAddUnreadIndicator(commentsToCheck);