-
-
Notifications
You must be signed in to change notification settings - Fork 551
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
Extension disabling Youtube dark mode #2138
Comments
Can confirm. This has started happening to me earlier today too. |
I would like to work on this issue if possible! |
hi! @MarckVinny @c4sper877 @JosephFak seems to be fixed in our current version v4.823? |
this wouldnt cause it. I read original code wrong (I blame bad indentation :) ) https://github.com/code-charity/youtube/blob/7d4429374188c1cac12797cf7e695aba25ccf817/js%26css/web-accessible/www.youtube.com/themes.js missed the purpose of 'default' is really bad name for this option, again should be called 'disabled' to clearly signal extension does nothing |
@MarckVinny @c4sper877 @JosephFak for a quick fix go to extension options / themes and select "Youtube dark" |
hi! @raszpl i dont get issues in versions before #2075, besides this one confusing thing: default(none/disabled/off) only removed themes but didn't change the attribute or cookie back to light (80000) or system (0), because we dont consider if the previous was only set to youtube's dark theme with us for a few seconds or minutes or day or set like that with youtube or for long already.
While the original darkmode shortcut seem to work and sticks after reloads. (From changing the attribute only?) I added your cookie code for now: it will not remove ambient light/cinematics anymore when going to the light theme. |
pre 2075 https://github.com/raszpl/YouTube-Extension/blob/99e6853e179bbbb50d7405780dee8942daf0586c/content-scripts/website-context/youtube-features/themes.js switching black/dark>default>black/dark>any theme corrupted cookie (cookievalue a global variable) and couldnt switch from custom/dark/black to default without reloading whole page
all theme settings did force overwrite of cookie if you switched couple times in a row:
even without dark switching black>default>black>any will corrupt cookie as above
https://github.com/code-charity/youtube/blob/7c9292be5dd69882b31659677fda490bb761259b/js%26css/web-accessible/www.youtube.com/themes.js
if that was the intention then why touch cookie in the first place? What is the point of this code? If it worked correctly (it doesnt) it would want to force F6 to 400 only if it was already set to 400!?!?! Now that I understand this better my solution is to remove any cookie manipulation in the first place. We dont need to touch F6 to switch themes. This 68995be & #2143 removes the need for setting cookie, overrides last few elements Youtube forgot in their own dark mode CSS. |
just haven't seen our CSS themes fail at page load
💡🤔 🎉 Don't know how synonym (or not) attribute & cookie work now or in history. So generally might choose to use both methods at need or just to back each other up, when correctly considering 80000 and no f6., since we already consider traps like list-view) The original author might faced other issues still. Even though back then youtube had also already started their dark theme too. (You might also noticed our "night mode", with schedule. I don't know why these features didnt stay in the same section (besides that operating systems have night mode). To me the theme previews look like maybe there also was an idea to keep working on it and have a dynamic theme changing all around the clock) |
and i remembered only changing the attribute also doesn't stick when logged out of youtube? |
When the extension is activated in Chrome, it disables YouTube's dark mode.
The text was updated successfully, but these errors were encountered: