-
Notifications
You must be signed in to change notification settings - Fork 132
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refresh theme cookie expiration date #2193
base: master
Are you sure you want to change the base?
Conversation
https://dfts-0.pigazzini.it/tests DEV updated. |
It seems that the first line adds dark theme CSS link first and then the duplicate one is added afterwards. |
I make the script set theme and removed according lines in the template. |
if (!getCookie("theme")) { | ||
setTheme(mediaTheme()); | ||
} | ||
setTheme(getCookie("theme") ?? mediaTheme()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This passes false in case the left side is false, which the function doesn't handle obviously because it only checks for dark and consider anything else as light, you need to make a separate refresh function to call in the else part of the original code if statement, looks so wrong and bugged.
I confirm that it's bugged. |
No description provided.