enhancment: Add ~new~
text to the header of new posts (#589)
This commit is contained in:
parent
e6f5271181
commit
063e8087a5
2 changed files with 12 additions and 3 deletions
|
@ -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}}").querySelector(".comment-user-info").innerHTML += "<span>~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}}").querySelector(".comment-user-info").innerHTML += "<span>~new~</span>";
|
||||
}
|
||||
catch(e) {}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
|
|
|
@ -494,7 +494,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}}").querySelector(".comment-user-info").innerHTML += "<span>~new~</span>";
|
||||
}
|
||||
catch(e) {}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue