diff options
Diffstat (limited to 'src/app/js/settings.js')
-rw-r--r-- | src/app/js/settings.js | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/app/js/settings.js b/src/app/js/settings.js index 3aa9c43..b5ef773 100644 --- a/src/app/js/settings.js +++ b/src/app/js/settings.js @@ -286,6 +286,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) { |