crittermike / toogles

A fresher, less annoying interface to YouTube.
http://toogl.es
MIT License
418 stars 56 forks source link

Possibility to start in dark mode? #23

Open ghost opened 6 years ago

ghost commented 6 years ago

Hi,

I've discovered Toogles recently I was wondering if there's any way to start in dark mode rather than having to click the theme-switcher every time. Of course a css could handle it but if there's any quick way I'd appreciate knowing it, especially that coding, even a css, is not among my talents!

Thanks.

crittermike commented 6 years ago

It should automatically save your preference. Which browser are you using? Are you by any chance clearing your browsing data regularly or something like that?

On Sun, Mar 4, 2018, 14:12 mazesy notifications@github.com wrote:

Hi,

I've discovered Toogles recently I was wondering if there's any way to start in dark mode rather than having to click the theme-switcher every time. Of course a css could handle it but if there's any quick way I'd appreciate knowing it, especially that coding, even a css, is not among my talents!

Thanks.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/mikecrittenden/toogles/issues/23, or mute the thread https://github.com/notifications/unsubscribe-auth/AAB-BZUtrMuat6KgT6rq2JiFPCNjVt0Fks5tbDyggaJpZM4SbdLL .

ghost commented 6 years ago

I'm running Firefox 58.0.2 x64 / Win7 x64 I have cookies off but an exception for toogl.es (anyway toogles won't display with cookies forbidden) Switching to dark mode does it fine, but once I close without clearing anything afterwards, toogles restarts in lite mode. As I said session cookie exception for toogl.es

I do have set Firefox's privacy.firstparty.isolateto true, but I can't conceive any relationship.

EDIT: I think I know why the dark-lite mode isn't saved.

As I said I've made a cookie exception for toogl.es, but that of a session cookie. It seems to me toogl.es writes the cookie in my LocalStorage (no classic cookie in view)... but a site authorized for session cookies only is not allowed to write in the user's LocalStorage if I remember correctly ... hence toogl.es cannot remember my choice. A normal cookie would remain for the session or always if I give the exception as always.

I'll try now with a lifetime cookie exception (no longer session only) for toogl.es and I bet it'll work...

I'll be right back.

ghost commented 6 years ago

Bingo. 1- toogl.es sets a LocalStorage cookie 2- with a session only cookie authorization toogl.es cannot write the cookie (no LocalStorage for session cookies). 3- Giving toogl.es an 'Allow" cookie rather than 'Session-only' cookie allows toogl.es to write the user's choice in his LocalStorage

I'd prefer a normal cookie, not t mention that LocalStorage is cleared by many users.

This said, it would be nice to have Toogles start in dark mode, either by default either with a scipt.