diff options
author | ManeraKai <manerakai@protonmail.com> | 2023-01-19 20:32:32 +0300 |
---|---|---|
committer | ManeraKai <manerakai@protonmail.com> | 2023-01-19 20:32:36 +0300 |
commit | 6f338f2c66cf291a8f3a49c4a7a6d867ef7fe88f (patch) | |
tree | 25f427a288626438882979375a39eaa636d3be0c /src/pages/options/init.js | |
parent | Removed Bibliogram https://github.com/libredirect/libredirect/issues/573 (diff) | |
download | libredirect-6f338f2c66cf291a8f3a49c4a7a6d867ef7fe88f.zip |
UX/UI tweaks
Diffstat (limited to 'src/pages/options/init.js')
-rw-r--r-- | src/pages/options/init.js | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/pages/options/init.js b/src/pages/options/init.js index cac23748..015daac7 100644 --- a/src/pages/options/init.js +++ b/src/pages/options/init.js @@ -9,18 +9,30 @@ function changeTheme() { case "dark": document.body.classList.add("dark-theme") document.body.classList.remove("light-theme") + for (const element of document.body.getElementsByClassName('dark')) { + element.style.display = 'none'; + } break case "light": document.body.classList.add("light-theme") document.body.classList.remove("dark-theme") + for (const element of document.body.getElementsByClassName('light')) { + element.style.display = 'none'; + } break default: if (matchMedia("(prefers-color-scheme: light)").matches) { document.body.classList.add("light-theme") document.body.classList.remove("dark-theme") + for (const element of document.body.getElementsByClassName('light')) { + element.style.display = 'none'; + } } else { document.body.classList.add("dark-theme") document.body.classList.remove("light-theme") + for (const element of document.body.getElementsByClassName('dark')) { + element.style.display = 'none'; + } } } resolve() |