From 23d5018310caf06007bd4b60af1f78614244af25 Mon Sep 17 00:00:00 2001 From: 0neGal Date: Wed, 24 Jan 2024 17:29:39 +0100 Subject: fixed settings categories staying closed When closing a category and then re-opening the setting popup, the categories shouldn't remain closed! --- src/app/js/settings.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/app/js/settings.js b/src/app/js/settings.js index 78a951e..57d542a 100644 --- a/src/app/js/settings.js +++ b/src/app/js/settings.js @@ -36,6 +36,12 @@ var Settings = { return opts; }, load: () => { + // re-opens any closed categories + let categories = document.querySelectorAll("#options details"); + for (let i = 0; i < categories.length; i++) { + categories[i].setAttribute("open", true); + } + let options = document.querySelectorAll(".option"); for (let i = 0; i < options.length; i++) { -- cgit v1.2.3