abstiles / deluminate

An extension for Google Chrome (and Chromium) that inverts the luminance of websites.
BSD 2-Clause "Simplified" License
216 stars 43 forks source link

Youtube embeds appear inverted on old.reddit.com #760

Open Galexlol opened 3 weeks ago

Galexlol commented 3 weeks ago

What version of Chrome are you using?

Versione 127.0.6533.120 (Build ufficiale) (a 64 bit)

What version of Deluminate do you have installed?

Deluminate-dev

What Operating System are you using?

Windows 10

What is the problem?

Embeds on old.reddit.com with RES appear inverted

Can you link to a web page that has the problem?

https://old.reddit.com/

Which Deluminate modes have the problem?

The ones making the page black

image

I tried clicking on "avoid inverting dark sites" as it was toggled and the issue was fixed, but then on reload it wasn't, and at the moment this does not get replicated, it did get replicated by pretty much clicking all buttons in the inversion options?

Actually while i was typing it seems to keep going from inverted to normal? Really weird behaviour, it just keeps going back and forth without me touching anything

Galexlol commented 3 weeks ago

It actually works if i click one of the buttons in the inversion options but it seems it's random everytime? And happens as well if i don't touch anything, it will just keep switching over and over at complete random, but it can't be a coincidence because every time i click it switches as well, really weird

EDIT:

image

It has been staying normal now for 5 minutes but i didn't refresh

abstiles commented 3 weeks ago

When I looked into this the other day, I suspected a race condition for the dynamic dark-mode detection in the new injection scheme. Solution is probably to remove automatic "all frames" injection and to have the content script for the page watch for iframes to request the appropriate injection for each of them. Would result in a slight delay on uninverting embeds, but I think that's the only way to ensure it happens accurately.