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
Add a feature to block by site #184
Comments
(More feedback from the v3.3.3/3.3.4 upgrades) |
Hi, I'm interested in contributing to this feature. Do you have an idea of how you would want it to work? For myself, I think in general the number of sites I have to interact with that I find problematic is relatively small, so just from my perspective I think I would probably benefit most from a blacklist. A whitelist would be acceptable but in order to benefit from stricter filtering I'd get a lot of false positives, and as a result I think I'd end up needing to add a much larger number of sites to a whitelist than I would a blacklist. What are your thoughts? Thanks! |
Copying the comment we had over on #197 regarding how it currently works as a starting point:
So at a quite basic level, it's as easy as extending the checks there - those functions already tie into all the right places for checking to occur so in some ways it's a guide. There are a couple of key things to know when performing development here:
Fortunately in this case we get lucky and it appears that all the logic for this portion is done "server"-side using direct calls from e.g. So if we assume that this got implemented via the options somehow, the following are probably true:
As far as the exact user experience, to me it sounds like your need would be satisfied by having a textbox with each line being e.g. a regex as a match, and something like that could work well with a future layer on top like the uBlock feature to turn the plugin on/off per site by just adding to the key list. So starting with a list would be a step towards that as well even though it wouldn't get all the way. What do you think? |
That sounds great. I'll work on some sort of minimal implementation and send it to you for review before I get too far. Does that sound okay with you?
As an open-source maintainer myself, I can appreciate this :) I've found it worth putting things like this in a CONTRIBUTING.md file when projects start to get more than a few contributors. GitHub will link to it any time someone opens a new issue or pull request. |
Fair enough - I didn't actually start the project with the primary intent of getting any contributions, only as a way to open the source and get feedback about bugs. But given that you'll likely be the second or third contributor to source, it's probably time! |
I just saw you responded regarding a whitelist but not a blacklist. Do you think it's feasible or desirable to create a blacklist? Rather than block all images from a domain, in particular I was thinking domains in the blacklist would be automatically handled as if they were untrusted. What do you think? |
Ah, I just was indicating that the whitelist is what is already implemented (in a hardcoded way) so it was good to look at as a guide. Both whitelist and blacklist, so yes a blacklist would be desirable. What you're suggesting with treating as "untrusted" is a bit different, though - and I think a bit more technically complex, but useful.
Implicitly, the last item of the list would be the regex matching everything with filter setting auto. Now, how about implementation of the above?
So I think it might be best to start with something like the above filter list but initially only support whitelist, blacklist, and default. Then the others can be incrementally added later. What do you think? |
I've been trying to chew on this for a bit. I don't think a blacklist that blocks all images is something I would use personally. For me the whole point of using this plugin is to take advantage of the AI to block images so I don't have to block all the images on a domain. Otherwise, I already use an ad blocker and those can easily block all images on a domain. Having said that, if I would use a whitelist then it follows that someone might want a blacklist, and it makes more sense to keep that functionality in this extension rather than require somebody to use an ad blocker which is designed for a different purpose. Beyond that, what would the purpose of having a "default" filter be, given that it would more or less be a no-op? Is it just a way to be explicit for certain domains? Lastly, the UX feels like it might be a bit user-unfriendly. Requiring the users to type out "whitelist," "blacklist," etc. feels slightly cumbersome but also error-prone. But it's hard to think of a better solution:
What do you think? |
Earlier in the thread you'd mentioned:
In this comment you mentioned:
Those two seem contradictory. Might be worth explaining what you mean a bit more so I can make sure I'm understanding correctly. With respect to UX, I think one thing to keep in mind is that we probably have generally two types of user: casual, and tech-savvy. I don't think the casual users would ever find going into options and adding something to a list - no matter how pretty or clear the UI is - to be user-friendly. It'd have to be out in front, like the way uBlock Origin has the on/off switch that turns on and off while you're on a specific page. That's what I think the most user-friendly approach is, or something close to it. But - once you get to a point of entering a list, I think you could make it fancy with two boxes but for most tech-savvy users I know, they won't care and may actually prefer text. So I'd say keep that part as simple as possible? |
The feature or similar has been suggested a number of times - I think either a whitelist/blacklist or as a button/refresh like uBlock Origin does would work well (or perhaps in conjunction).
The text was updated successfully, but these errors were encountered: