Make more JSonic
This commit is contained in:
parent
1a407090d9
commit
577521f7c4
2 changed files with 7 additions and 9 deletions
|
@ -201,6 +201,7 @@
|
||||||
<script src="{{ 'js/comments+submission_listing.js' | asset }}"></script>
|
<script src="{{ 'js/comments+submission_listing.js' | asset }}"></script>
|
||||||
<script src="{{ 'js/comments.js' | asset }}"></script>
|
<script src="{{ 'js/comments.js' | asset }}"></script>
|
||||||
|
|
||||||
|
{# See #}
|
||||||
<script>
|
<script>
|
||||||
{% if p and (not v or v.highlightcomments) %}
|
{% if p and (not v or v.highlightcomments) %}
|
||||||
comments = JSON.parse(localStorage.getItem("comment-counts")) || {}
|
comments = JSON.parse(localStorage.getItem("comment-counts")) || {}
|
||||||
|
@ -213,9 +214,8 @@
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
];
|
];
|
||||||
|
|
||||||
commentsToCheck = commentsToCheck.filter(comment => {
|
commentsToCheck = commentsToCheck.filter(comment => comment[1] > lastCount.t)
|
||||||
return comment[1] > lastCount.t
|
.map(comment => comment[0]);
|
||||||
}).map(comment => comment[0]);
|
|
||||||
|
|
||||||
if (lastCount) commentsAddUnreadIndicator(commentsToCheck);
|
if (lastCount) commentsAddUnreadIndicator(commentsToCheck);
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
@ -259,9 +259,8 @@
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
];
|
];
|
||||||
|
|
||||||
commentsToCheck = commentsToCheck.filter(comment => {
|
commentsToCheck = commentsToCheck.filter(comment => comment[1] > lastCount.t)
|
||||||
return comment[1] > lastCount.t
|
.map(comment => comment[0]);
|
||||||
}).map(comment => comment[0]);
|
|
||||||
|
|
||||||
if (lastCount) commentsAddUnreadIndicator(commentsToCheck);
|
if (lastCount) commentsAddUnreadIndicator(commentsToCheck);
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
|
@ -498,9 +498,8 @@
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
];
|
];
|
||||||
|
|
||||||
commentsToCheck = commentsToCheck.filter(comment => {
|
commentsToCheck = commentsToCheck.filter(comment => comment[1] > lastCount.t)
|
||||||
return comment[1] > lastCount.t
|
.map(comment => comment[0]);
|
||||||
}).map(comment => comment[0]);
|
|
||||||
|
|
||||||
if (lastCount) commentsAddUnreadIndicator(commentsToCheck);
|
if (lastCount) commentsAddUnreadIndicator(commentsToCheck);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue