From 61cb484be9b91bfc467a6827eb4c9b77548017bf Mon Sep 17 00:00:00 2001 From: f0x Date: Wed, 10 May 2023 20:18:50 +0200 Subject: [PATCH] remove old spoiler js --- web/source/frontend/index.js | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/web/source/frontend/index.js b/web/source/frontend/index.js index e5d447ae5..bc2d4a4fd 100644 --- a/web/source/frontend/index.js +++ b/web/source/frontend/index.js @@ -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); } -}); +}); \ No newline at end of file