yep / Nightshift

Dark mode for Safari (macOS).
https://yep.github.io/Nightshift
MIT License
32 stars 3 forks source link

Follow system theme #3

Open paramaggarwal opened 2 years ago

paramaggarwal commented 2 years ago

Is there a way to make this follow the system theme? When macOS is in Dark Mode, then the webpages are dark.

iosdevben commented 1 year ago

Seems like the most important feature to support.

Volodymyr-13 commented 1 year ago

@yep can you please update us with this?

tfguinan commented 4 months ago

I had a go here and got it kinda working. Aside from requiring building in Xcode, it reloads the page when coming out of dark mode. My first experience with JS so kinda janky. There's probably a better way to do it using the dark reader component.

https://github.com/user-attachments/assets/f214ed0e-e1e2-4a60-aca4-79cd80111b3f

Volodymyr-13 commented 4 months ago

Well, reloading page is really bad idea, since user could type something or filling form.. or play music and reload will kill it. deal breaker.

tfguinan commented 4 months ago

You're right, it should probably call darkReader.disable() instead, though not sure if that will work with the fallback mode. Will keep playing with it when I get some free time.