Skip to content

Add new scriptlet — 'href-sanitizer' #327

@MasterKia

Description

@MasterKia

Related uBO scriptlet:
https://github.com/uBlockOrigin/uBlock-issues/wiki/Resources-Library#href-sanitizerjs-


Related issues/commits:
uBlockOrigin/uBlock-issues#2531

gorhill/uBlock@e123256

gorhill/uBlock@56e1d92


It can be used to replace some click tracking links with the actual link.
The most notable case is https://www.mozilla.org/en-US/firefox/browsers/mobile/android/ where the "Get it on Google play" button has app.adjust.com tracking link.


Usage so far in uBO lists:

! https://github.com/uBlockOrigin/uBlock-issues/issues/2531#issuecomment-1512373333
mozilla.org##+js(href-sanitizer, a[href^="https://app.adjust.com/"][href*="?redirect="], ?redirect)

! https://www.androidauthority.com/third-party-reddit-apps-statement-3332238/ redirect links
androidauthority.com##+js(href-sanitizer, a[href^="https://androidauth.wpengine.com/wp-json/api/advanced_redirect?ref="], ?ref)

! https://www.pcgamingwiki.com/wiki/Grand_Theft_Auto_V
pcgamingwiki.com##+js(href-sanitizer, a[href^="https://www.dpbolvw.net/click-"][href*="?url="], ?url)
pcgamingwiki.com##+js(href-sanitizer, a[href^="https://greenmangaming.sjv.io/c/"][href*="?u="], ?u)

! https://azrom.net/rom-oppo-a71-cph1717-cph1801-official-firmware-all-repair-file/ timer
azrom.net##+js(href-sanitizer, a[href^="https://azrom.net/"][href*="?url="], ?url)

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions