Minim looks good, but there is one serious thing that prevents it from being the best solution.
This is:
- the weight of the rules or;
- white or black lists.
Any of these implementations will solve the issue.
Solution #1: Weight of rules
rule #1: "* | +++" - block all scripts on any domain
rule #2: "yutube.com | ---" - allow scripts on "yutube.com"
The order in which the rules are entered is important here.
Or you need to determine in advance that the allowing rules are stronger than the blocking ones.
Solution #2: white list
The “white list” option and the “default” setting for any sites not from the “white list”.
In this case, users can determine that any site on the network will be blocked, but when added to the "white list", the rules will be applied from it.
Otherwise, the application is useless because when the user visits any unknown site, the scripts immediately begin to attack him