diff --git a/templates/partial/flex.html b/templates/partial/flex.html index 8843889..3a963a1 100644 --- a/templates/partial/flex.html +++ b/templates/partial/flex.html @@ -16,8 +16,8 @@ const darkSchemeWatch = window.matchMedia('(prefers-color-scheme: dark)'); function detectThemeAndSwitchStyle() { - let theme = localStorage.getItem('themeOverride') || 'browser'; - if (theme === 'browser') { + let theme = localStorage.getItem('themeOverride'); + if (theme !== 'light' && theme !== 'dark') { theme = darkSchemeWatch.matches ? 'dark' : 'light'; } console.log(`Switching theme to ${theme}.`)