Greasy Fork is available in English.

YouTube Dark Theme Enabler

Enables YouTube's built-in Dark theme by default

< Opiniones de YouTube Dark Theme Enabler

Puntuación: Bueno; el script funciona tal y como promete

§
Publicado: 07/05/2024

seems not work with Tampermonkey + Quantum ?

StreampunkAutor
§
Publicado: 08/05/2024

Tested with current versions of Firefox 125.0.3 and Tempermonkey 5.1.0 on a clean profile and my script works as expected.
Perhaps you have some extensions or scripts that are preventing my script from working properly.
Try turning off the other extensions and scripts for YouTube and check how the script works in that case

§
Publicado: 10/05/2024

Yes, that's a problem with:
u-Youtube
When i disable it, your script work as expected!

Can you make a fix to work with "u-Youtube"?

StreampunkAutor
§
Publicado: 10/05/2024

"YouTube Dark Theme Enabler" uses Youtube's built-in dark theme, and "u-Youtube" uses its own dark theme that I can't influence in any way.
But you can fix "u-Youtube" script yourself so that it doesn't interfere with the built-in dark Youtube theme. To do this, just comment out the following block of code:
/*if(localStorage.getItem('dark_mode')==1){
if(!document.querySelector("html").hasAttribute("dark")){
document.querySelector("html").setAttribute("dark",true);}
}
else if(document.querySelector("html").hasAttribute("dark"))
{document.querySelector("html").removeAttribute("dark")}*/

Quick test showed that this correction allows "YouTube Dark Theme Enabler" work properly and the functions of "u-Youtube" continue to work fine, just don't use the theme change function.

§
Publicado: 10/05/2024

Thanks for the Tweak!
Work like a charm, as your script.

Your script as the advantage to always enable the Dark theme.

With "u-Youtube", i need to enable it when i open for first time a Youtube page.
With your tweak, it can disable/enable (useful to test Dark or No Dark theme).
And at the refresh, your script re enable it.

StreampunkAutor
§
Publicado: 10/05/2024

Cool if watching Youtube has gotten better for you

Publicar respuesta

Inicia sesión para responder.