jekyll-klise icon indicating copy to clipboard operation
jekyll-klise copied to clipboard

[Feature Request] detecting and automatic switching to site vendor dark mode

Open selfisekai opened this issue 5 years ago • 5 comments

Is your feature request related to a problem? Please describe. some websites provide dark mode for its users but it needs to be enabled by user. I think that darkreader could have some set of rules or JS functions for that.

Describe the solution you'd like I'll take anilist.co as an example.

  1. darkreader has a predefined rule to check if the website uses dark mode currently (body.site-theme-dark).
  2. if it exists, don't load standard darkreader
  3. if there is no such element, check for .theme-selector .dark, the dark mode switch element.
  4. if it exists, click on it and disable standard darkreader.
  5. if it does not exist, then usual darkreader rules are enabled.

also there should be some generic rules, like for mastodon [dark mode enabled on the most of instances by default (try: https://mastodon.social/@Gargron ), but some instances switch it like on https://framapiaf.org/@Framasoft ] or nextcloud.

Additional context

selfisekai avatar May 06 '20 09:05 selfisekai