make opening reports hide expanded text (on vice versa)

master
Aevann 2023-04-28 12:45:56 +02:00
parent b46bd80c97
commit 188333d395
1 changed files with 8 additions and 1 deletions

View File

@ -1,5 +1,12 @@
function expandText(id) {
document.getElementById('post-text-'+id).classList.toggle('d-none');
document.querySelectorAll(".toggled-visible").forEach(i => {
i.classList.add("d-none")
i.classList.remove("toggled-visible")
});
const toggling = document.getElementById('post-text-'+id)
toggling.classList.toggle('d-none');
toggling.classList.add("toggled-visible")
for (const e of document.getElementsByClassName('text-expand-icon-p_'+id))
{
e.classList.toggle('fa-expand-alt');