darkreader / darkreader/darkreader

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

Abierto
#8,513 3 comentarios 1 reacción 0 asignados Ver en GitHub
enhancement
Lenguaje dominante
TypeScript
Estrellas
22.4k
Forks
2.7k
Merge medio
21 h 46 min
PR fusionados (30 d)
75

Descripción

# 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.

Guía de contribución

Abrir la guía de contribución

Línea de trabajo

El issue no nombra archivos ni pruebas; comienza localizando los puntos de entrada de la detección del modo oscuro, el renderizado inicial y la persistencia del estado de la página. Define cómo se almacenan, caducan y vuelven a comprobarse las páginas oscuras nativas detectadas y, después, verifica que volver a visitar una página que sigue siendo oscura evita el destello inicial sin suprimir la detección actual.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
typescript
Área
frontend
Tipo de issue
Nueva funcionalidad
Dificultad
5/5
Tiempo estimado
Más de una semana
Estado de actividad
Estancado
Claridad
Bastante claro
Aptitud para principiantes
30/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.