forked from MarseyWorld/MarseyWorld
do this https://watchpeopledie.tv/h/meta/post/61549/megathread-for-bugs-and-suggestions/3764788#context
parent
3356a9c819
commit
ff13921177
|
@ -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")
|
||||
}
|
|
@ -119,9 +119,9 @@
|
|||
{% for a in c.awards %}
|
||||
<span class="mr-1">
|
||||
{% if a.kind in ["emoji","emoji-hz"] %}
|
||||
<img class="emoji-award-icon" alt='{{a.title}} Award given by @{{a.user.username}}: "{{a.note}}"' data-bs-toggle="tooltip" loading="lazy" src="{{SITE_FULL_IMAGES}}/e/{{a.note}}.webp" data-bs-toggle="tooltip" data-bs-placement="bottom" title='{{a.title}} Award given by @{{a.user.username}}: "{{a.note}}"'>
|
||||
<img class="emoji-award-icon" alt='{{a.title}} Award given by @{{a.user.username}}: "{{a.note}}"' data-bs-toggle="tooltip" loading="lazy" src="{{SITE_FULL_IMAGES}}/e/{{a.note}}.webp" data-bs-toggle="tooltip" data-bs-placement="bottom" title='{{a.title}} Award given by @{{a.user.username}}: "{{a.note}}"' {% if a.awarded_utc %}data-on="{{a.awarded_utc}}" data-nonce="{{g.nonce}}" data-onmouseover="award_timestamp(this)"{% endif %}>
|
||||
{% else %}
|
||||
<i class="{{a.class_list}} px-1" data-bs-toggle="tooltip" data-bs-placement="bottom" title='{{a.title}} Award given by @{{a.user.username}}{% if a.kind in ["chud","namelock","flairlock"] %}: "{{a.note}}"{% endif %}'></i>
|
||||
<i class="{{a.class_list}} px-1" data-bs-toggle="tooltip" data-bs-placement="bottom" title='{{a.title}} Award given by @{{a.user.username}}{% if a.kind in ["chud","namelock","flairlock"] %}: "{{a.note}}"{% endif %}' {% if a.awarded_utc %}data-on="{{a.awarded_utc}}" data-nonce="{{g.nonce}}" data-onmouseover="award_timestamp(this)"{% endif %}></i>
|
||||
{% endif %}
|
||||
</span>
|
||||
{% endfor %}
|
||||
|
|
|
@ -32,9 +32,9 @@
|
|||
{% for a in p.awards %}
|
||||
<span class="mr-1">
|
||||
{% if a.kind in ["emoji","emoji-hz"] %}
|
||||
<img class="emoji-award-icon" alt='{{a.title}} Award given by @{{a.user.username}}: "{{a.note}}"' data-bs-toggle="tooltip" loading="lazy" src="{{SITE_FULL_IMAGES}}/e/{{a.note}}.webp" data-bs-toggle="tooltip" data-bs-placement="bottom" title='{{a.title}} Award given by @{{a.user.username}}: "{{a.note}}"'>
|
||||
<img class="emoji-award-icon" alt='{{a.title}} Award given by @{{a.user.username}}: "{{a.note}}"' data-bs-toggle="tooltip" loading="lazy" src="{{SITE_FULL_IMAGES}}/e/{{a.note}}.webp" data-bs-toggle="tooltip" data-bs-placement="bottom" title='{{a.title}} Award given by @{{a.user.username}}: "{{a.note}}"' {% if a.awarded_utc %}data-on="{{a.awarded_utc}}" data-nonce="{{g.nonce}}" data-onmouseover="award_timestamp(this)"{% endif %}>
|
||||
{% else %}
|
||||
<i class="{{a.class_list}} px-1" data-bs-toggle="tooltip" data-bs-placement="bottom" title='{{a.title}} Award given by @{{a.user.username}}{% if a.kind in ["chud","namelock","flairlock"] %}: "{{a.note}}"{% endif %}'></i>
|
||||
<i class="{{a.class_list}} px-1" data-bs-toggle="tooltip" data-bs-placement="bottom" title='{{a.title}} Award given by @{{a.user.username}}{% if a.kind in ["chud","namelock","flairlock"] %}: "{{a.note}}"{% endif %}' {% if a.awarded_utc %}data-on="{{a.awarded_utc}}" data-nonce="{{g.nonce}}" data-onmouseover="award_timestamp(this)"{% endif %}></i>
|
||||
{% endif %}
|
||||
</span>
|
||||
{% endfor %}
|
||||
|
|
Loading…
Reference in New Issue