mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-11-23 15:52:56 -06:00
remove old spoiler js
This commit is contained in:
parent
df3ad1e06e
commit
61cb484be9
1 changed files with 1 additions and 17 deletions
|
|
@ -45,22 +45,6 @@ new PhotoswipeVideoPlugin(lightbox, {});
|
||||||
|
|
||||||
lightbox.init();
|
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) => {
|
Array.from(document.getElementsByClassName("spoiler-details")).forEach((spoiler) => {
|
||||||
const button = spoiler.getElementsByClassName("button")[0];
|
const button = spoiler.getElementsByClassName("button")[0];
|
||||||
|
|
||||||
|
|
@ -76,4 +60,4 @@ Array.from(document.getElementsByClassName("spoiler-details")).forEach((spoiler)
|
||||||
|
|
||||||
spoiler.addEventListener("toggle", update);
|
spoiler.addEventListener("toggle", update);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
Loading…
Add table
Add a link
Reference in a new issue