fix popovers
parent
9289c4a2a3
commit
361f5a6549
|
@ -39,7 +39,7 @@ function popclick(e) {
|
|||
let popover = document.getElementsByClassName("popover")
|
||||
popover = popover[popover.length-1]
|
||||
|
||||
if (popover.getElementsByClassName('pop-badges').length > 0) {
|
||||
if (popover.getElementsByClassName('pop-badges')) {
|
||||
const badgesDOM = popover.getElementsByClassName('pop-badges')[0];
|
||||
badgesDOM.innerHTML = "";
|
||||
for (const badge of author["badges"]) {
|
||||
|
@ -65,6 +65,12 @@ function popclick(e) {
|
|||
}, 5);
|
||||
}
|
||||
|
||||
for (const element of document.getElementsByClassName('user-name')) {
|
||||
element.onclick = (e) => {
|
||||
popclick(e);
|
||||
};
|
||||
}
|
||||
|
||||
document.addEventListener("click", function(){
|
||||
active = document.activeElement.getAttributeNode("class");
|
||||
if (active && active.nodeValue == "user-name text-decoration-none"){
|
||||
|
|
|
@ -168,7 +168,7 @@
|
|||
{% if c.author.verified %}<i class="fas fa-badge-check align-middle ml-1 {% if c.author.verified=='Glowiefied' %}glow{% endif %}" style="color:{% if c.author.verifiedcolor %}#{{c.author.verifiedcolor}}{% else %}#1DA1F2{% endif %}" data-bs-toggle="tooltip" data-bs-placement="bottom" title="{{c.author.verified}}"></i>
|
||||
{% endif %}
|
||||
|
||||
<a class="user-name text-decoration-none" href="{{c.author.url}}" data-pop-info='{{c.author.json_popover(v) | tojson}}' data-nonce="{{g.nonce}}" data-onclick='popclick(event)' data-bs-placement="bottom" data-bs-toggle="popover" data-bs-trigger="click" data-content-id="popover" tabindex="0" style="color:#{{c.author.name_color}}; font-size:12px; font-weight:bold;">
|
||||
<a class="user-name text-decoration-none" href="{{c.author.url}}" data-pop-info='{{c.author.json_popover(v) | tojson}}'' data-bs-placement="bottom" data-bs-toggle="popover" data-bs-trigger="click" data-content-id="popover" tabindex="0" style="color:#{{c.author.name_color}}; font-size:12px; font-weight:bold;">
|
||||
<div class="profile-pic-30-wrapper">
|
||||
<img loading="lazy" src="{{c.author.profile_url}}" class="profile-pic-30 mr-2">
|
||||
{% if c.author.hat_active(v)[0] -%}
|
||||
|
|
|
@ -84,7 +84,7 @@
|
|||
|
||||
{% if p.author.verified %}<i class="fas fa-badge-check align-middle ml-1 {% if p.author.verified=='Glowiefied' %}glow{% endif %}" style="color:{% if p.author.verifiedcolor %}#{{p.author.verifiedcolor}}{% else %}#1DA1F2{% endif %}" data-bs-toggle="tooltip" data-bs-placement="bottom" title="{{p.author.verified}}"></i>
|
||||
{% endif %}
|
||||
<a class="user-name text-decoration-none" href="{{p.author.url}}" data-pop-info='{{p.author.json_popover(v) | tojson}}' data-nonce="{{g.nonce}}" data-onclick='popclick(event)' data-bs-placement="bottom" data-bs-toggle="popover" data-bs-trigger="click" data-content-id="popover" tabindex="0" style="color: #{{p.author.name_color}}; font-weight: bold;">
|
||||
<a class="user-name text-decoration-none" href="{{p.author.url}}" data-pop-info='{{p.author.json_popover(v) | tojson}}' data-bs-placement="bottom" data-bs-toggle="popover" data-bs-trigger="click" data-content-id="popover" tabindex="0" style="color: #{{p.author.name_color}}; font-weight: bold;">
|
||||
<div class="profile-pic-30-wrapper" style="margin-top:9px">
|
||||
<img loading="lazy" src="{{p.author.profile_url}}" class="profile-pic-30 mr-2">
|
||||
{% if p.author.hat_active(v)[0] -%}
|
||||
|
|
Loading…
Reference in New Issue