Skip to content
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

Convert $queryprune modifier to $removeparam #3

Closed
AdamWr opened this issue Nov 2, 2020 · 10 comments
Closed

Convert $queryprune modifier to $removeparam #3

AdamWr opened this issue Nov 2, 2020 · 10 comments
Assignees

Comments

@AdamWr
Copy link
Member

AdamWr commented Nov 2, 2020

It seems that uBlock Origin has added support for queryprune modifier - gorhill/uBlock@1e2eb03, so I think that it would be a good idea to convert it to removeparam.

@ameshkov
Copy link
Member

ameshkov commented Nov 2, 2020

I'll be keeping an eye on that feature. It looks a little bit more limited than $removeparam so I guess when the work is done, converting it won't be that complicated.

See the task here: uBlockOrigin/uBlock-issues#1356 (comment)

@zzebrum zzebrum added the enhancement New feature or request label Nov 3, 2020
@gorhill
Copy link

gorhill commented Nov 10, 2020

It looks a little bit more limited than $removeparam

What do you have in mind when you say this?

@ameshkov
Copy link
Member

Check the spec: https://kb.adguard.com/en/general/how-to-create-your-own-ad-filters#removeparam-modifier

Essentially the same, but less limitations are imposed on the rule syntax (supports any URL, regexes)

@gorhill
Copy link

gorhill commented Nov 10, 2020

I did check before writing my comment above and I still do not understand the statement.

supports any URL

I don't understand this part, there is no restriction regarding URL for queryprune=.

regexes

The values for queryprune= are implicitly regex, hence why surrounding / are not needed. The only difference with regexes is to use | for anchoring to start and end because I do not want to have to deal with the ambiguity of $ given that is already being used as a filter option separator.

Note that queryprune= supports filtering parameters by either parameter name, paramater value, or both since the regex is tested against the string param=value.

@ameshkov
Copy link
Member

I guess this pipe char is what confused me. Anyways, the closer they are, the better, we'll either fully support it or convert to $removeparam internally, depends on how interchangeable they are.

@gorhill
Copy link

gorhill commented Nov 10, 2020

I cannot see removeparam being used in many AdGuard filter lists I've looked at -- beside unmatched broad exceptions in AdGuard Base. Is this a new filter option?

@ameshkov
Copy link
Member

Yep, it's been added just recently and used internally in the Stealth Mode module (it has "remove tracking parameters" setting).

@DandelionSprout
Copy link
Member

DandelionSprout commented Nov 22, 2020

I've submitted a vice-versa report to uBO at uBlockOrigin/uBlock-issues#1356, since there's now active usage cases of $removeparam in Dandelion Sprout's Nordic Filters, and of $queryprune in Frellwit's Swedish Filter, as well as me having made an entire hobby-basis list dedicated to $removeparam.

@ameshkov
Copy link
Member

@Mizzick we may need to implement some changes (see this: AdguardTeam/CoreLibs#1384).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

8 participants