diff options
author | adam <56338480+adastx@users.noreply.github.com> | 2022-09-18 13:22:55 +0200 |
---|---|---|
committer | adam <56338480+adastx@users.noreply.github.com> | 2022-09-18 13:22:55 +0200 |
commit | be9f98490c258f64694226c746de1f0e35c00672 (patch) | |
tree | 14be468256eff4e65a450f4ac963336486a1ac02 /src/scripts | |
parent | 28fbb2a85e15525292a3651f6f9d23d786de6f37 (diff) |
Better support for dark mode extensions
Diffstat (limited to 'src/scripts')
-rw-r--r-- | src/scripts/darktheme.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/scripts/darktheme.js b/src/scripts/darktheme.js index b44db9a..0c577b6 100644 --- a/src/scripts/darktheme.js +++ b/src/scripts/darktheme.js @@ -11,11 +11,11 @@ if (theme) { function setTheme(dark) { if (dark) { - document.body.classList.add("dark-mode"); + document.documentElement.classList.add("dark-mode"); themeButton.className = "fa fa-sun-o"; localStorage.setItem("theme", "dark"); } else { - document.body.classList.remove("dark-mode"); + document.documentElement.classList.remove("dark-mode"); themeButton.className = "fa fa-moon-o"; localStorage.setItem("theme", "light"); } |