uMatrix icon indicating copy to clipboard operation
uMatrix copied to clipboard

[feature idea] ability to group rules to make them easier to find, modify and share

Open berrythesoftwarecodeprogrammar opened this issue 10 years ago • 0 comments
trafficstars

what i really like about uBlock's 'my filters' section is that whitespace and comments are allowed and i can create my own groups of filters and share them between my browsers.

uMatrix's (and i guess uBlock's) dynamic rules sections are automatically sorted though and i end up with a really long list. sometimes its desirable to collect all rules for a certain website which could be spread across different hosts and ip addresses, so the list has to be scrolled multiple times to find and copy all desired rules. if a grouping ability was added, it would let the user add a bunch of rules to one group and be found easily, and groups can be sorted alphabetically (in the rule list and also the contents of the groups). either put the grouped rules at the top of the list or at the bottom and have all other normally sorted rules outside them.

i dont know what the best syntax would be but examples could be:

/* google stuff
docs.google.com 1st-party cookie allow
docs.google.com 1st-party frame allow
docs.google.com 1st-party script allow
docs.google.com 1st-party xhr allow
...
encrypted.google.com 1st-party frame allow
encrypted.google.com 1st-party script allow
encrypted.google.com 1st-party xhr allow
encrypted.google.com googleusercontent.com image allow
encrypted.google.com gstatic.com image allow
encrypted.google.com gstatic.com script allow
*/

or

! group google
...rule
...rule
! end group

and i guess it would make sure groups are ended before comitting, and then sort the rules as usual, first the outside rules then all grouped rules, and then put the groups in alphabetical order at the bottom (or top). related rules would then always be together and rules wont get lost in long lists

if this is asking too much/not useful enough for most then this can be closed