mirror of
https://github.com/gorhill/uBlock.git
synced 2026-03-11 09:04:36 +00:00
Updated "trusted-replace-outbound-text" scriptlet.
parent
bb5ecd724e
commit
eb2ebb9977
1 changed files with 9 additions and 0 deletions
|
|
@ -1071,6 +1071,15 @@ matches `ed5ce21c7d7c95c8662c7844c0f4a4dc` or any similiar value in `"csrf_token
|
|||
- `www.reddit.com##+js(trusted-replace-outbound-text, JSON.stringify, '/(?<="adblock":{"enabled":)true/', false)`
|
||||
matches `true` in `"adblock":{"enabled":true` and replaces it with `false` resulting in a new spoofed value: `"adblock":{"enabled":false`
|
||||
|
||||
When the replacement starts with `json:`, it will be first decoded using JSON.parse() (since [1.59.1b8](https://github.com/gorhill/uBlock/commit/0dcb985601)), example:
|
||||
|
||||
- `example.com##+js(trusted-replace-outbound-text, somefn, json:"ok")`
|
||||
|
||||
The doublequotes are required since this is what JSON.parse()
|
||||
expects as a valid JSON string.
|
||||
|
||||
<br>
|
||||
|
||||
Solves related issues / discussions:
|
||||
- [Add a scriptlet to intercept atob call and prune its text output](https://github.com/uBlockOrigin/uBlock-issues/issues/3157)
|
||||
- [Add new scriptlet — 'trusted-replace-outbound-text'](https://github.com/AdguardTeam/Scriptlets/issues/410)
|
||||
|
|
|
|||
Loading…
Reference in a new issue