-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Request: Option to darken/change contrast of gifs #27
Comments
Isn't it enough to be able to pause gifs by default? I don't quite understand why you would want to darken gifs, but not other images. (And do you mainly want to darken them while running, or...?) |
I'll elaborate a little about the origin of this request. I find this add-on to be useful for a number of reasons, but most of It works nicely for the former reason, but for the latter it doesn't quite As such I understand this feature request seems to come out of the left Anyhow, thanks for your feedback and your great work :) ps. just an aside, but the playback controls are invisible when FF page colour accessibility controls are enabled. I think it would be another good feature to allow clicking anywhere on the image to stop playback On 17/06/2015 12:52 AM, Simon Lindholm wrote:
|
Ah, I see. I do get a bit of a feeling of feature bloat, and I wonder how generally useful this will be... It does so happen, though, that changes I've made very recently in #16 would make this very simple to implement, so you can at least experiment with this yourself. If you grab the XPI from that issue, or use the "indicator" branch, the only change you need to make to the source code to try this out is on line 550 of content/content.js:
can be made into e.g.
if you want to make GIFs 80% transparent. Or you can use any other predefined SVG filter. (You'll need to set the option mentioned in that issue, too.) To make this change to the raw XPI, open it as a ZIP archive, and edit the relevant file. It could be that the
Entirely or just hard to see? The latter happens also with some images, but it's hard to detect from an addon, and I don't have another image. There is already an option to "Toggle GIFs on click", funnily enough. |
Thanks very much for linking that issue! I tried substituting various instances of el.style.filter but wasn't able to see any change to the gif. Sorry if my knowledge of FF scripting is too limited to be of help right now. But your implentation of SVG filters looks very promising and was extremely enlightening!
Entirely, as if it were treated as a watermark (the accessibility option removes all background watermark images when turned on). You can see it for yourself it you go to options->content->font color and unclick "Allow page to choose colors". That said, the "Show an indicator for animated gifs" in the new branch does show up on first load. It disappears after being replaced with the hover controls.
Right! I use playback on hover so never saw this function work (behaviour seems to be overidden if both options are checked). |
Ok, too bad... Here's one XPI which might work: http://simonsoftware.se/temp/toggle-gifs-faded.xpi
Ah, because I'm using
Weird, it works for me. Could be some other JS click listener on the page that it interferes with, perhaps.
You're welcome! It's funny how everyone seems to have their own opinion about what behavior works best. |
Oh, that's pefect! And the fading in is just icing on the cake. Thank you!
I'm also grateful to be learning secrets about how extensions work!
You're welcome! It's funny how everyone seems to have their own opinion
about what behavior works best.
It makes you think a bit, doesn't it ;) I imagine it diverges at some
fundamental stage when people choose how they interface with the
program; in my case I use the grab and drag addon so clicking on the
page is one of most natural gestures possible. Now the page is a huge
button to me ;)
A knowledge of what JS can do also obviously helps. Thanks again!
|
I added a hidden pref for this behavior: set extensions.togglegifs.indicatorStyle to 2 in about:config and the latest version of the addon (currently http://simonsoftware.se/temp/toggle-gifs.xpi, will upload to AMO soon) ought to work. I may add UI for the option if anyone else shows interest. |
It would be inline with the use of this extension to allow 'darkening' of gif images, as a feature to further reduce their distraction from page content. The contrast/hue/saturation etc could additionally be modifable to ease impact on the eye.
The text was updated successfully, but these errors were encountered: