Closed iam-TJ closed 6 years ago
Apologies for the delayer response. I just did a quick review and everything looks good. I will take a closer look this evening and most probably merge these in and release a new version.
I have tested the changes with Firefox 58.0.2, and the images get inverted regardless if the option is enabled or not.
I've tested with 58.0.1 (64-bit) on Linux and it works. What specific page are you using to test?
This is using the latest Firefox version on 64bit ubuntin 16.04:
Initiation:
web-ext run
Went to google.com. Inverted colors, everything was inverted as expected. Reverted back to normal colors.
Went to extension properties, and enabled "Do not invert images". Went back to google.com. Inverted colors, everything including the image got inverted.
Repeated with https://www.wikipedia.org/ with the same results.
We're seeing extremely strange differences.
I'm not using web-ext though, I'm working directly with the extension unpacked in the profile directory ( ~/.mozilla/firefox/
I use the options.html Enable/Disable to 'reload' the extension if I make changes to the source.
I'm attaching a screenshot showing the addon options.html, FF about dialog, and a separate window at wikipedia.
I see, I always ran tests using web-ext, as it is also used to package the extension to be submitted to Mozilla.
I will have to see why there is such a difference. I am sure that this all can be resolved.
Updating web-ext seems to have resolved the issues.
I have also updated your css select to include more "images" and basic video as such:
img, svg, video, canvas, [style*=".jpg"], [style*=".png"], [style*=".gif"]
Thanks. I held off adding other elements because whilst testing on the bb bbc.co.uk site I encountered some strange issues - possibly related to them sometimes using a
New feature: option to disable inverting images
options.{js,html} have been refactored and now can be extended easily if additional options are required.
background.js has been refactored to streamline the code and provide improved handling of logic states. On extension load it now also calls toggleColors() to ensure the browser action icon and tab states are set correctly.
Closes #14.
Signed-off-by: Tj hacker@iam.tj