Updated 'set-cookie' and 'trusted-set-cookie' descriptions.

garry-ut99 2024-07-10 16:14:26 +00:00
parent 29ad3c7c2f
commit 7d45ffc1cf

@ -1048,6 +1048,7 @@ Parameters:
- `necessary`<sup>4</sup> / `required`<sup>4</sup>
- `approved`<sup>5</sup> / `disapproved`<sup>5</sup>
- `hide`<sup>6</sup> / `hidden`<sup>6</sup>
- `essential`<sup>7</sup> / `nonessential`<sup>7</sup>
- optional, cookie path, defaults to /; possible values:
- `/`: root path
@ -1059,12 +1060,15 @@ Parameters:
<sup>4. [1.53.5rc5](https://github.com/gorhill/uBlock/commit/32fb93c5256047d8ddbc3599ecfd1568b578e7fe)</sup>
<sup>5. [1.57.3rc1](https://github.com/gorhill/uBlock/commit/7f0b2f4a5ef0013d4b5256adc343994bcce0f90e)</sup>
<sup>6. [1.58.1b7](https://github.com/gorhill/uBlock/commit/bdb99862ce93d61e9202ee1bad656276e4a9ee5a)</sup>
<sup>7. [1.58.1rc0](https://github.com/gorhill/uBlock/commit/37d31a82d8)</sup>
The scriptlet encodes cookie names and values, e.g value "{ test: 'value'}" becomes `%7B%20test%3A%20'value'%7D`.
Tokens:
- `reload, 1`: the scriplet will force a reload of the webpage if the cookie being set was not already set.
`; Secure` will be automatically used when cookie names starts with `__Secure-` or `__Host-` (since [1.58.1b8](https://github.com/gorhill/uBlock/commit/b4d8750f445cfa06bebd184a6f3cdb4d73148e72)).
Examples:
- `example.com##+js(set-cookie, CookieConsent, 1)`
- `example.com##+js(set-cookie, gdpr-settings-cookie, true)`
@ -1102,6 +1106,8 @@ Variadic parameters (must appears after required and optional parameters):
- `reload, 1`: the scriplet will force a reload of the webpage if the cookie being set was not already set.
- `domain, [value]`: the scriptlet will set the domain of the cookie to _value_.
`; Secure` will be automatically used when cookie names starts with `__Secure-` or `__Host-`.
Examples:
- `example.com##+js(trusted-set-cookie, cmpconsent, 1-accept_1)`
- `example.com##+js(trusted-set-cookie, cmpconsent, $now$)`