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

Support uBO/Adguard removeparam filter #166

Closed
ryanbr opened this issue Apr 5, 2021 · 1 comment · Fixed by #235
Closed

Support uBO/Adguard removeparam filter #166

ryanbr opened this issue Apr 5, 2021 · 1 comment · Fixed by #235

Comments

@ryanbr
Copy link
Collaborator

ryanbr commented Apr 5, 2021

Supporting removeparam, will give us the ability to filter out tracking bits of a url.

https://github.com/gorhill/uBlock/wiki/Static-filter-syntax#removeparam
https://kb.adguard.com/en/general/how-to-create-your-own-ad-filters?aid=16593#removeparam-modifier

To test in uBO. add ||google.com^$removeparam=/(num|oq|gs_l)/ or ||google.*^$removeparam=/(num|oq|gs_l)/

Test the following url: https://www.google.com/search?num=100&q=google&oq=google&gs_l=serp.3..0l10.7976.8565.0.9999.6.6.0.0.0.0.358.617.2-1j1.2.0....0...1c.1.64.serp..4.2.615.BQ3ZvdzuPGE

(In order of codes, expanded also works)

$removeparam=num,domain=google.com
$removeparam=oq,domain=google.com
$removeparam=gs_l,domain=google.com

The above google.com url simply becomes https://www.google.com/search?q=google

Another sample (with wildcards)

https://www.bbc.com/news/world-africa-56637573?xtor=AL-72-%5Bpartner%5D-%5Bbbc.news.twitter%5D-%5Bheadline%5D-%5Bnews%5D-%5Bbizdev%5D-%5Bisapi%5D&at_medium=custom7&at_custom2=twitter&at_campaign=64&at_custom3=%40BBCWorld&at_custom1=%5Bpost+type%5D&at_custom4=B2BFEAF6-9605-11EB-97D3-02D74744363C

Can be filtered down too: ||bbc.com^$queryprune=/(xtor.*|at_.*)/ => https://www.bbc.com/news/world-africa-56637573

A few more filters tested https://0bin.net/paste/vleyxFEC#xMx8TzvreSdTwxUcbVOCFYesnjjXk4wcKCaD-U3bgMR (on various news sites). Only one bug was attempting to filter news.google.com links would cause redirection issues.

@SwiftyPop
Copy link

Any update on this?

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

Successfully merging a pull request may close this issue.

2 participants