summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorshironeko <shironeko@tesaguri.club>2022-12-29 14:41:17 -0500
committershironeko <shironeko@tesaguri.club>2022-12-29 14:41:17 -0500
commit1aaf290814e4737142c382c148ede816ca1a5df2 (patch)
tree7b4fbb052c5100eb3eba9e35107c7f15c4cabce8
parent5160d8bae39dc5cc5d51abee90571a03c08d0f2b (diff)
downloadinvidious-1aaf290814e4737142c382c148ede816ca1a5df2.tar.gz
invidious-1aaf290814e4737142c382c148ede816ca1a5df2.tar.bz2
invidious-1aaf290814e4737142c382c148ede816ca1a5df2.zip
handle auto theme correctly with the manual toggle
If the user used the manual toggle, they will not be able to get back to auto since it will force set to light theme. This should fix that.
-rw-r--r--assets/js/themes.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/assets/js/themes.js b/assets/js/themes.js
index 76767d5f..84a9f6d9 100644
--- a/assets/js/themes.js
+++ b/assets/js/themes.js
@@ -22,9 +22,11 @@ function setTheme(theme) {
if (theme === THEME_DARK) {
toggle_theme.children[0].className = 'icon ion-ios-sunny';
document.body.className = 'dark-theme';
- } else {
+ } else if (theme === THEME_LIGHT) {
toggle_theme.children[0].className = 'icon ion-ios-moon';
document.body.className = 'light-theme';
+ } else {
+ document.body.className = 'no-theme';
}
}