Thursday, January 20, 2022

Block/Allow Images?

 Recently I got some friendly feedback from "qvim". There were multiple parts to it, but I wanted to highlight one of the suggestions. The desired feature would be to ...

block with click, sometimes it doesn't work and if possible I would like to click on the image with the right button and be able to block or allow. (very important)

Now, I'm actually a bit surprised that I haven't gotten more feedback around this type of request in the past. It's popped up maybe once or twice. There a couple interesting points about this, one technical and one more based on use cases.

 First, the technical reason. For those who haven't peered at the source code, you may be interested to learn that the addon does not actually interact directly with the HTML elements at all. Nope. The filtering actually ties in at a lower level - it is basically processing the network requests for different media types. When I started the project, I thought about taking an approach that would interact with the HTML for each image, but decided against it because I thought working with streams would do a better job of catching every single image going through the system. Several years in, I think I made the right choice but there are still some exceptions - base 64 images and a few others delivered in special ways. However, I don't have to deal endless hacks against the HTML DOM to try to catch every element change or to try to make images invisible until the addon has scanned them.

So why does this matter? Well, it means that once the data has been scanned, I don't have an easy way to know where it actually appears on the page. The image data is essentially read-only. Similarly, I certainly could create something to interact with the images as HTML elements, but there just hasn't been a strong need.

Second, the use cases. Folks like to use this addon in a variety of ways. In some cases, the user is an adult and would like to filter out the junk. But in other cases, parents are using this as a basic defense for their kids. While it's not easy to lock down addons as a parental control, I do try to avoid showing one-click options to see images. There's also a third use case, where the user is an adult but is trying to overcome pornography. In that case, it may also not be the best option to make it too easy to view a blocked image.

So where does that leave things? Well, since the data is already delivered and read-only, it is not technically easy to go back and show an already blocked image (possible, yes, but definitely not trivial). However, hiding an offensive image that the filter missed is easier because it does not require this coordination - for example, the HTML element can just be altered. Similarly, from a use case perspective, it is likely good to allow blocking an image, but not showing one. The easiest way to do something like this would be to expose it as a right-click context menu, but if you follow that link you may notice that the user experience could get a little clunky.

This also ties in with another request: can users report that images are either being blocked incorrectly or that they should be blocked? This one is a bit more spicy to deal with.

I'd like to hear more feedback about if you'd be interested in this blocking feature and/or if you'd be interested in an image reporting feature. Let me know using the feedback link in the addon, or head on over to GitHub!


Update: you can see a rudimentary version of this here: https://github.com/wingman-jr-addon/wingman_jr/tree/hide-images with relevant issue at https://github.com/wingman-jr-addon/wingman_jr/issues/162

No comments:

Post a Comment