mirror of
https://github.com/gorhill/uBlock.git
synced 2026-03-11 09:04:36 +00:00
added trusted-click-element supported options
parent
3191721b59
commit
20ca81b44b
1 changed files with 8 additions and 4 deletions
|
|
@ -1145,9 +1145,11 @@ Clicks elements on webpages. Can target single or multiple elements in a sequenc
|
|||
|
||||
Parameters:
|
||||
|
||||
* required, a list of css selector(s). Multiple selectors must be quoted.
|
||||
* optional, Extramatch (will be added later, this argument must be left empty for the time being).
|
||||
* optional, delay in ms how long the scriptlet will postphone the execution
|
||||
- required, a list of css selector(s). Multiple selectors must be quoted. Use `>>>` to select elements inside shadow root. (New in [1.54.1b3](https://github.com/gorhill/uBlock/commit/941077a25c))
|
||||
- optional, Extramatch: conditions for the clicking to occur, cookies and localStorage are matched using the format `name:key[=value]` where the value is optional. Multiple conditions can be separated by comma. Prefix with `!` to only click if the cookie/localStorage item does not exist. Supported names: <sup>[1.55.1b12](https://github.com/gorhill/uBlock/commit/45e62c939f)</sup>
|
||||
- `cookie`: test string or regex against cookies
|
||||
- `localStorage`: test string or regex against localStorage
|
||||
- optional, delay in ms how long the scriptlet will postphone the execution
|
||||
|
||||
Tokens:
|
||||
|
||||
|
|
@ -1158,8 +1160,10 @@ Examples:
|
|||
|
||||
* `example.com##+js(trusted-click-element, button.reject-all)`
|
||||
* `example.com##+js(trusted-click-element, '[for="CookiePurposes_1_"], [for="CookiePurposes_2_"], button.js-save')`
|
||||
* `example.com##+js(trusted-click-element, #cmpwrapper >>> .cmpboxbtnyes)`
|
||||
* `example.com##+js(trusted-click-element, #cmp-btn-accept, , 500)`
|
||||
* `example.com##+js(trusted-click-element, #privacy-cp-wall-accept, , , log, 1)`
|
||||
* `example.com##+js(trusted-click-element, #cmp-btn-accept, !cookie:/^gpt_ppid[^=]+=/, 5000)`
|
||||
* `example.com##+js(trusted-click-element, button[name="agree"], 'cookie:cmpconsent, localStorage:promo=yes')`
|
||||
|
||||
Also see:
|
||||
- [AdGuard `trusted-click-element`](https://github.com/AdguardTeam/Scriptlets/blob/master/wiki/about-trusted-scriptlets.md#trusted-click-element)
|
||||
|
|
|
|||
Loading…
Reference in a new issue