aboutsummaryrefslogtreecommitdiff
path: root/src/app
diff options
context:
space:
mode:
Diffstat (limited to 'src/app')
-rw-r--r--src/app/js/settings.js9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/app/js/settings.js b/src/app/js/settings.js
index 3addf0e..d57dfc7 100644
--- a/src/app/js/settings.js
+++ b/src/app/js/settings.js
@@ -251,6 +251,15 @@ settings.popup.load = () => {
}
settings.popup.switch = (el, state) => {
+ if (! el) {return}
+
+ // prevent switches from being switched when disabled
+ if (el.getAttribute("disabled") != null
+ || el.classList.contains("disabled")) {
+
+ return;
+ }
+
if (state) {
return el.classList.add("on");
} else if (state === false) {