diff --git a/Resources-Library.md b/Resources-Library.md index e7df7ef..3bb5f39 100644 --- a/Resources-Library.md +++ b/Resources-Library.md @@ -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: [1.55.1b12](https://github.com/gorhill/uBlock/commit/45e62c939f) + - `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)