forked from MarseyWorld/MarseyWorld
tryna fix new_comment_count
parent
1ce1410268
commit
90551bc143
|
@ -210,7 +210,7 @@
|
|||
<script>
|
||||
if (!("standalone" in window.navigator) && !(window.navigator.standalone)) {
|
||||
if (window.innerWidth <= 737) {
|
||||
window.addEventListener('DOMContentLoaded', function() {
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
const tt = bootstrap.Tooltip.getOrCreateInstance(document.getElementById('mobile-prompt'))
|
||||
tt.show()
|
||||
document.getElementsByClassName('tooltip')[0].onclick = function(event){
|
||||
|
|
|
@ -1126,11 +1126,8 @@
|
|||
<script>
|
||||
(() => {
|
||||
{% if not v or v.highlightcomments %}
|
||||
window.addEventListener('DOMContentLoaded', function() {
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
showNewCommentCounts('{{p.id}}', {{p.comment_count}})
|
||||
})
|
||||
{% endif %}
|
||||
|
||||
{% if "?context" not in request.full_path %}
|
||||
localStorage.setItem("old-comment-counts", localStorage.getItem("comment-counts"))
|
||||
|
||||
|
@ -1139,6 +1136,8 @@
|
|||
comments['{{p.id}}'] = {c: newTotal, t: Date.now()}
|
||||
localStorage.setItem("comment-counts", JSON.stringify(comments))
|
||||
{% endif %}
|
||||
})
|
||||
{% endif %}
|
||||
})()
|
||||
</script>
|
||||
|
||||
|
|
|
@ -306,7 +306,7 @@
|
|||
|
||||
<script>
|
||||
{% if not v or v.highlightcomments %}
|
||||
window.addEventListener('DOMContentLoaded', function() {
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
showNewCommentCounts({{p.id}}, {{p.comment_count}})
|
||||
})
|
||||
{% endif %}
|
||||
|
|
Loading…
Reference in New Issue