-
Notifications
You must be signed in to change notification settings - Fork 104
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
feat: $removeparam
#4528
base: master
Are you sure you want to change the base?
feat: $removeparam
#4528
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note: we're going to apply filters one by one |
Leaving a note: regexp wrapping: |
test: add `isRemoveParam` and `isRedirectable` chore: reject on `removeparam` negation test: parsing removeparam test: removeparam test: removeparam
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this support exceptions like $removeparam=igshid,domain=instagram.com|threads.net
?
* s1) global removal + exception => global removal wins ``` @@||example.com$removeparam=utm ||example.com$removeparam ``` result.filter=global removal result.exception=(none) * s2) removal + global exception => exception wins ``` ||example.com$removeparam=utm @@||example.com$removeparam ``` result.filter=removal result.exception=global exception * s3) removal + exception => exception wins ``` ||example.com$removeparam=utm @@||example.com$removeparam=utm ``` result.filter=removal result.exception=exception --- 0. global exception 1. global removal 2. exception 3. removal
This adds experimental
$removeparam
support for adblocker: https://github.com/gorhill/ublock/wiki/static-filter-syntax#removeparamThe suggested matching process changed by this PR is illustrated as follows:
The removeparam filter priorities are as the followings, and also described in the exception test as a code:
Details
result.filter=global removal
result.exception=(none)
result.filter=removal
result.exception=global exception
result.filter=removal
result.exception=exception
TODO