diff --git a/Resources-Library.md b/Resources-Library.md index f1b3c4b..48f97cb 100644 --- a/Resources-Library.md +++ b/Resources-Library.md @@ -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. + +
+ 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)