~new~ text

This commit is contained in:
Rudyon 2023-05-13 01:29:38 +03:00
parent ff1bdf9526
commit 5b43e43334
2 changed files with 20 additions and 3 deletions

View file

@ -211,7 +211,10 @@
{% for c in p.comments %}
{% if not (v and v.id==c.author_id) and not c.voted %}
if ({{c.created_utc*1000}} > lastCount.t)
try {document.getElementById("comment-{{c.id}}-only").classList.add('unread')}
try {
document.getElementById("comment-{{c.id}}-only").classList.add('unread')
document.getElementById("comment-{{c.id}}-only").innerHTML += "<span class='new'>~new~</span>";
}
catch(e) {}
{% endif %}
{% endfor %}
@ -253,7 +256,10 @@
{% for c in p.comments %}
{% if not (v and v.id==c.author_id) and not c.voted %}
if ({{c.created_utc*1000}} > lastCount.t)
try {document.getElementById("comment-{{c.id}}-only").classList.add('unread')}
try {
document.getElementById("comment-{{c.id}}-only").classList.add('unread')
document.getElementById("comment-{{c.id}}-only").innerHTML += "<span class='new'>~new~</span>";
}
catch(e) {}
{% endif %}
{% endfor %}

View file

@ -494,7 +494,18 @@
{% for c in p.comments %}
{% if not (v and v.id==c.author_id) and not c.voted %}
if ({{c.created_utc*1000}} > lastCount.t)
try {document.getElementById("comment-{{c.id}}-only").classList.add('unread')}
try {
document.getElementById("comment-{{c.id}}-only").classList.add('unread')
<<<<<<< HEAD
<<<<<<< HEAD
document.getElementById("comment-{{c.id}}").querySelector(".comment-user-info").innerHTML += "<span>~new~</span>";
=======
document.getElementById("comment-user-info").innerHTML += "<span class='new'>~new~</span>";
>>>>>>> parent of 58053d818 (previously it didn't display at all this makes it actually work it does look ugly though)
=======
document.getElementById("comment-{{c.id}}-only").innerHTML += "<span class='new'>~new~</span>";
>>>>>>> parent of 9e499c42f (~new~ test thingy for searching unread comments.)
}
catch(e) {}
{% endif %}
{% endfor %}