darkreader / darkreader/darkreader

[Feature Request] Add pages that got detected to be dark to an internal set to improve initial rendering

Open
#8,513 3 comments 1 reaction 0 assignees View on GitHub
enhancement
Dominant language
TypeScript
Stars
22.4k
Forks
2.7k
Avg merge
21h 11m
Merged PRs (30d)
78

Description

# Feature Request

The dark reader recently got the ability to automatically detect I'd a page is dark or not. While this is a really helpful feature in general, it is not perfect either. The biggest problem that I myself face is that on initial load of a page, the extension first just starts converting the page to dark mode. Then it notices that the page already is dark mode, so it reverts applying its own styles, so that we get the official dark mode of the page.

This looks somewhat weird, whenever you open a page.

My proposal to fix this would be to have some internal set that gets updated whenever the dark reader detects that a page is dark. So that on the next time, that I enter the page, the dark reader "remembers" this page to have a native dark mode and just does not apply any styling whatsoever.

To not let the set grow too large it could be done that pages that have not been visited in a long time just get removed from it.

Also to prevent the issue that a website might remove native dark mode support in the future, I would still let the dark reader check if the page really still has a dark mode.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.