mirror of
https://github.com/gorhill/uBlock.git
synced 2026-03-11 09:04:36 +00:00
Updated Resources Library (markdown)
parent
fa7abdc4dd
commit
0a2fc989a1
1 changed files with 30 additions and 7 deletions
|
|
@ -37,6 +37,7 @@
|
|||
- [prevent-setTimeout](#prevent-setTimeoutjs-) _(no-setTimeout-if / nostif / setTimeout-defuser)_
|
||||
- [adjust-setInterval](#adjust-setIntervaljs-) _(nano-setInterval-booster / nano-sib)_
|
||||
- [adjust-setTimeout](#adjust-setTimeoutjs-) _(nano-setTimeout-booster / nano-stb)_
|
||||
- [prevent-innerHTML](#prevent-innerHTMLjs-)
|
||||
- [prevent-xhr](#prevent-xhrjs-) _(no-xhr-if)_
|
||||
- [trusted-prevent-xhr](#trusted-prevent-xhrjs-) [Trusted]
|
||||
- [prevent-fetch](#prevent-fetchjs-) _(no-fetch-if)_
|
||||
|
|
@ -235,12 +236,7 @@ Parameters:
|
|||
- required, _property_ (chain of properties joined by `.`) to trap in order to launch the stack trace matching code, ex. `Math.random`
|
||||
- optional, string/_regular expression_, the needle to match against the stack trace. If the empty string, only log. Prepend pattern with `!` to test for unmatched patterns in stack trace <sup>(New in [1.51.1b6](https://github.com/gorhill/uBlock/commit/84cc69aa10bc9c8045ed94b528ddc158c06ae7ab))</sup>
|
||||
|
||||
|
||||
Tokens:
|
||||
- "log":
|
||||
- `all`: log stack trace for all access to trapped property
|
||||
- `match`: log stack trace for defused access to trapped property
|
||||
- `nomatch`: log stack trace for non-defused access to trapped property
|
||||
The scriptlet logs when there is a match. If verbose mode is enabled, it will log both matches/no matches.
|
||||
|
||||
Stack trace is normalized, but there still can be differences (Chromium vs Firefox) because of different format of stack trace.
|
||||
|
||||
|
|
@ -713,6 +709,8 @@ Prevent web pages from using _`eval()`_ on specific matching payloads.
|
|||
Parameters:
|
||||
- optional, string/_regular expression_, matching in payload string.
|
||||
|
||||
When used without parameters, will log calls to `eval()` to the logger.
|
||||
|
||||
Examples:
|
||||
- `orgyxxxhub.com##+js(noeval-if, replace)`
|
||||
|
||||
|
|
@ -979,6 +977,26 @@ Also see:
|
|||
|
||||
***
|
||||
|
||||
### prevent-innerHTML.js [↪](https://github.com/gorhill/uBlock/blob/935ce74d3a7b300be12a952f2e7dfa9f0f595db9/src/js/resources/prevent-innerHTML.js#L42)
|
||||
|
||||
New in [1.63.1b0](https://github.com/gorhill/uBlock/commit/fe744816f1df077fae764e15e5bb5bd0f1c1edc1).
|
||||
|
||||
Conditionally prevent assignment to `innerHTML` property.
|
||||
|
||||
Parameters:
|
||||
|
||||
- Optional, `selector`: The element must matches `selector` for the prevention to take place.
|
||||
- Optional, `pattern`: A pattern to match against the assigned value. The pattern can be a plain string, or a regex. Prepend with `!` to reverse the match condition.
|
||||
|
||||
When verbose mode is enabled, the scriptlet will log the assigned value of the element.
|
||||
|
||||
Example:
|
||||
```adblock
|
||||
example.com##+js(prevent-innerHTML, body, adblock)
|
||||
```
|
||||
|
||||
***
|
||||
|
||||
### prevent-xhr.js [↪](https://github.com/gorhill/uBlock/blob/745fbd1c02b7179052ba97f51c54f7cb000636f0/assets/resources/scriptlets.js#L1171)
|
||||
### no-xhr-if.js
|
||||
|
||||
|
|
@ -1607,7 +1625,10 @@ Parameters:
|
|||
- `true` / `t`<sup>3</sup> / `false` / `f`<sup>3</sup>,
|
||||
- `yes` / `y` / `no` / `n`,
|
||||
- `all`<sup>10</sup> / `none`<sup>10</sup> / `functional`<sup>10</sup>,
|
||||
- `granted`<sup>11</sup> / `done`<sup>11</sup>
|
||||
- `granted`<sup>11</sup> / `done`<sup>11</sup>,
|
||||
- `decline`<sup>12</sup> / `declined`<sup>12</sup>,
|
||||
- `closed`<sup>13</sup> / `next`<sup>13</sup> / `mandatory`<sup>13</sup>,
|
||||
- `disagree`<sup>13</sup> / `agree`<sup>13</sup>
|
||||
- optional, cookie path, defaults to /; possible values:
|
||||
- `/`: root path
|
||||
- `none`: to set no path at all
|
||||
|
|
@ -1623,6 +1644,8 @@ Parameters:
|
|||
<sup>9. [1.60.1b12](https://github.com/gorhill/uBlock/commit/4d982d9972be4eb0a23e289c6f3ec3ae8cca36f2)</sup>
|
||||
<sup>10. [1.61.3b10](https://github.com/gorhill/uBlock/commit/791a2b08e1a15c169c0a86130de769822628c81d)</sup>
|
||||
<sup>11. [1.62](https://github.com/gorhill/uBlock/commit/62178de75682a9e7e8fc7d1bedda2c7f476b5b66)</sup>
|
||||
<sup>12. [1.62.1b1](https://github.com/gorhill/uBlock/commit/4b12247da106249a4d1e1143fd1c30d97656de73)</sup>
|
||||
<sup>13. [1.62.1b2](https://github.com/gorhill/uBlock/commit/35a47d674b47b14fed18691ce5ede6a7adddb4a1)</sup>
|
||||
|
||||
The scriptlet encodes cookie names and values, e.g value "{ test: 'value'}" becomes `%7B%20test%3A%20'value'%7D`.
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue