Skip to content
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

Possibility to start in dark mode? #23

Open
ghost opened this issue Mar 4, 2018 · 3 comments
Open

Possibility to start in dark mode? #23

ghost opened this issue Mar 4, 2018 · 3 comments

Comments

@ghost
Copy link

ghost commented Mar 4, 2018

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
Copy link
Owner

crittermike commented Mar 4, 2018 via email

@ghost
Copy link
Author

ghost commented Mar 4, 2018

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.isolate to 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
Copy link
Author

ghost commented Mar 4, 2018

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant