iorate / ublacklist

Blocks specific sites from appearing in Google search results
https://iorate.github.io/ublacklist/
MIT License
5.64k stars 290 forks source link

feature_request(rulesets): multiple personal blocklists #190

Closed Kristinita closed 2 years ago

Kristinita commented 2 years ago

1. Summary

It would be nice, if would be possible to have multiple personal rulesets (blocklists) for rulesets contributors.

2. Example of desired behavior

New option in uBlacklist settings — “Use multiple personal blocklists”.

If the option enabled, blocklists contributor can set multiple personal blocklists. For my case it, for example, “Phishing sites”, “Bookstores”, “Wikipedia automatic translation sites” and “Porn sites”.

uBlacklist user wants to block site. He clicked to “Block this site” → he saw a window “Please, select personal blocklist” → he select blocklist. For example, he adds bookstores to “Bookstores” blocklist, phishing sites to “Phishing sites” list and so on.

3. Explanation of the need for the feature

3.1. Summary

Save time for people who want to share their personal blocklists with other users (especially if the blocklists are large).

3.2. Details

I’m sure no one wants to see phishing sites in their search results. But I admit that some people want to see bookstores and porn sites in the search results. That is, people would like to use part of my blocklist, but not the full blocklist. I think that the best solution in this case is to divide one big blocklist into rulesets by category, so that users can decide for themselves which category sites they don’t want to see in the search results.

But the separation of the blocklist can take a long time. Currently, uBlacklist ruleset contributors have to do a double job: first they add sites to one big blocklist, then they have to categorize the sites of that big blocklist. For example, my personal ruleset contains 2792 sites (in Google Hit Hider by Domain format) at the time of writing this issue. For most sites, I don’t remember why I added them to the blocklist, what category they belong to. Splitting my blocklist will take me a few days.

If the uBlacklist developers implement the proposed feature, the blocklist contributors will not need to do the extra job of splitting the blocklist.

Thanks.

iorate commented 2 years ago

I don't think that this feature is worth implementing with great difficulty (although pull requests are always welcome), because you can extract rules with specific categories using comments even in the current version.

  1. Append a category when adding a rule
    • スクリーンショット 2022-01-18 18 45 37
  2. Export the ruleset and filter it
    # Extract rules ending with "# Example"
    cat uBlacklist.txt | grep "# Example$" | sed -e "s/ *# Example$//" > uBlacklist-example.txt
Kristinita commented 2 years ago

Type: Question :question:

1. Question

@iorate, can you add to the documentation details how the comments syntax works in uBlacklist? It appears to be an undocumented feature.

2. Example

Will uBlacklist work in the case below? Is this the correct syntax?

# This is a long comment explaining why I placed kiraexample.com to the blocklist. See discussion on this issue on https://kiraforum.com/uBlacklist .
*://kiraexample.com/* # Example

Thanks.

iorate commented 2 years ago

can you add to the documentation details how the comments syntax works in uBlacklist? It appears to be an undocumented feature.

That's true. Added.

Will uBlacklist work in the case below? Is this the correct syntax?

Yes. To check the syntax of a rule, you can enter the rule in the options page. Comments and invalid rules are displayed in gray.

options

BradKML commented 2 years ago

@iorate some ideas: The ability to import uBlock blocklist into uBlacklist. This is merely downloading the lists online, and then does string concatenation.