remotes/1693045480750635534/spooky-22
Aevann1 2022-02-21 03:01:53 +02:00
parent 939d2ff527
commit e6d9b697b5
1 changed files with 1 additions and 32 deletions

View File

@ -13,9 +13,6 @@
html {
scroll-padding-top: 75px;
}
.comment {
overflow: hidden;
}
.comment .comment-body {
padding: 3px 0 0 0;
}
@ -512,35 +509,7 @@
{% endif %}
{% if v %}
<button id="dropdown-button-{{c.id}}" style="margin-top:0.2rem" class="btn caction py-0 nobackground px-1 text-muted" data-bs-toggle="dropdown" aria-expanded="false"><i class="fas fa-ellipsis-h fa-fw"></i></button>
<script>
let open{{c.id}} = false;
const button{{c.id}} = document.getElementById("dropdown-button-{{c.id}}");
button{{c.id}}.addEventListener("click", () => {
let parent = button{{c.id}}.parentElement;
while (!parent.classList.contains("comment")) {
parent = parent.parentElement;
}
if (!open{{c.id}}) {
parent.style.overflow = 'visible';
open{{c.id}} = true;
const listener = () => {
parent.style.overflow = 'hidden';
open{{c.id}} = false;
document.removeEventListener("click", listener);
}
setTimeout(() => {
document.addEventListener("click", listener);
}, 0);
}
});
</script>
<button style="margin-top:0.2rem" class="btn caction py-0 nobackground px-1 text-muted" data-bs-toggle="dropdown" aria-expanded="false"><i class="fas fa-ellipsis-h fa-fw"></i></button>
<ul class="dropdown-menu">
{% if v.admin_level and v.id==c.author_id %}
<button id="undistinguish-{{c.id}}" class="dropdown-item list-inline-item d-none {% if c.distinguish_level %}d-md-block{% endif %} text-info" onclick="post_toast3(this,'/distinguish_comment/{{c.id}}','distinguish-{{c.id}}','undistinguish-{{c.id}}','no')"><i class="fas fa-id-badge text-info fa-fw"></i>Undistinguish</button>