diff --git a/files/assets/js/comments+post_listing.js b/files/assets/js/comments+post_listing.js index d71d212f5..63150a37e 100644 --- a/files/assets/js/comments+post_listing.js +++ b/files/assets/js/comments+post_listing.js @@ -158,3 +158,10 @@ document.addEventListener("click", function(e) { bs_trigger(generated_popover) } }); + +function award_timestamp(t) { + const date = formatDate(new Date(t.dataset.on*1000)); + const text = t.getAttribute("data-bs-original-title") + t.setAttribute("data-bs-original-title", `${text} on ${date.toString()}`); + t.removeAttribute("data-onmouseover") +} \ No newline at end of file diff --git a/files/templates/comments.html b/files/templates/comments.html index 552a90a0d..3dd75b542 100644 --- a/files/templates/comments.html +++ b/files/templates/comments.html @@ -119,9 +119,9 @@ {% for a in c.awards %} {% if a.kind in ["emoji","emoji-hz"] %} - {{a.title}} Award given by @{{a.user.username}}: "{{a.note}}" + {{a.title}} Award given by @{{a.user.username}}: "{{a.note}}" {% else %} - + {% endif %} {% endfor %} diff --git a/files/templates/util/macros.html b/files/templates/util/macros.html index 6dc588e87..292099ef4 100644 --- a/files/templates/util/macros.html +++ b/files/templates/util/macros.html @@ -32,9 +32,9 @@ {% for a in p.awards %} {% if a.kind in ["emoji","emoji-hz"] %} - {{a.title}} Award given by @{{a.user.username}}: "{{a.note}}" + {{a.title}} Award given by @{{a.user.username}}: "{{a.note}}" {% else %} - + {% endif %} {% endfor %}