mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2024-11-26 05:36:38 +00:00
remove old spoiler js
This commit is contained in:
parent
df3ad1e06e
commit
61cb484be9
|
@ -45,22 +45,6 @@ new PhotoswipeVideoPlugin(lightbox, {});
|
|||
|
||||
lightbox.init();
|
||||
|
||||
Array.from(document.getElementsByClassName("spoiler-label")).forEach((label) => {
|
||||
let checkbox = document.getElementById(label.htmlFor);
|
||||
if (checkbox != undefined) {
|
||||
function update() {
|
||||
if (checkbox.checked) {
|
||||
label.innerHTML = "Show more";
|
||||
} else {
|
||||
label.innerHTML = "Show less";
|
||||
}
|
||||
}
|
||||
update();
|
||||
|
||||
label.addEventListener("click", () => { setTimeout(update, 1); });
|
||||
}
|
||||
});
|
||||
|
||||
Array.from(document.getElementsByClassName("spoiler-details")).forEach((spoiler) => {
|
||||
const button = spoiler.getElementsByClassName("button")[0];
|
||||
|
||||
|
@ -76,4 +60,4 @@ Array.from(document.getElementsByClassName("spoiler-details")).forEach((spoiler)
|
|||
|
||||
spoiler.addEventListener("toggle", update);
|
||||
}
|
||||
});
|
||||
});
|
Loading…
Reference in a new issue