FireFoxInvertColors icon indicating copy to clipboard operation
FireFoxInvertColors copied to clipboard

Colors are not inverted during page load

Open ghost opened this issue 7 years ago • 2 comments

Hi!

When a page loads, its colors are not inverted. It hurts my eyes to see the screen going white then black then white again, etc. I know this addon works by adding a stylesheet, but it seems firefox waits until the page is loaded to apply it.

Is there any way to apply the CSS directly, without waiting for the page to be fully loaded?

ghost avatar Oct 10 '17 20:10 ghost

I am not really sure how apply the CSS before and/or during the load. The new API that is provided by FF is a little limited.

Max-Github avatar Oct 11 '17 06:10 Max-Github

I see. Maybe sometime the new API will allow this to be done.

For the moment I went to about:config changed browser.display.background_color to #000000 and restarted firefox. It doesn't work with the master version of this extension, but with the changes made here.

This hack keeps the screen black before the site's CSS is loaded. Then it can turn white if the site's CSS has a background-color instruction, and you have to wait before style.css is loaded for it to turn black again.

ghost avatar Oct 12 '17 16:10 ghost