From ff139211778bbe22e477fd75487487f37f0dd5b7 Mon Sep 17 00:00:00 2001 From: Aevann Date: Mon, 18 Nov 2024 15:55:52 +0200 Subject: [PATCH] do this https://watchpeopledie.tv/h/meta/post/61549/megathread-for-bugs-and-suggestions/3764788#context --- files/assets/js/comments+post_listing.js | 7 +++++++ files/templates/comments.html | 4 ++-- files/templates/util/macros.html | 4 ++-- 3 files changed, 11 insertions(+), 4 deletions(-) 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 %}