AdguardTeam / Scriptlets

AdGuard scriptlets library
GNU General Public License v3.0
151 stars 30 forks source link

Improve 'href-sanitizer' — add base64 support #455

Closed billkewl closed 6 days ago

billkewl commented 1 month ago

Someone websites hide the actual urls behind base64 encoded string. Currently 'href-sanitizer' can't handle this correctly. It would be best if there's a base64 option for 'href-sanitizer' scriptlet

Related issue (Firefox skip redirect extension) https://github.com/sblask-webextensions/webextension-skip-redirect/issues/181

billkewl commented 1 month ago

It'd be best if href's attributes can be modified at the same time.

For example, every video link in youtube search result page has a parameter "pp=[base64 encoded search query]" in it and it can't be got rid of with current options. Can we have another option for text and ?parameter to remove parameters in href, like $removeparam considering YouTube can add more private info in it. Sharing raw links from right click copy also exposes how the sharer found the video. $removeparam can only remove parameters after clicking on the link.

Other websites might shove in unnecessary, often tracking parameters as well. So I would like to see a combination of removeparam and href-santinizer

slavaleleka commented 1 month ago

@billkewl thanks for the suggestion!

I've made a separate task for it: https://github.com/AdguardTeam/Scriptlets/issues/460