mirror of
https://github.com/gorhill/uBlock.git
synced 2024-07-01 02:02:29 +02:00
Documented this https://github.com/gorhill/uBlock/commit/0e1e4b82c5
parent
930655194c
commit
b022250019
|
@ -1024,7 +1024,7 @@ Parameters:
|
|||
- required, cookie value. Possible values:
|
||||
- arbitrary value
|
||||
- empty string for no value
|
||||
- `$now$` keyword for setting current time in ms, e.g 1667915146503
|
||||
- `$now$` keyword for setting current time in ms, e.g 1667915146503. Can be used inside a string since [1.58.1b0](https://github.com/gorhill/uBlock/commit/0e1e4b82c5ea464f1e7837c5c8f400e5ffac4b3c)
|
||||
- `$currentDate$` keyword for setting current time as string, e.g 'Tue Nov 08 2022 13:53:19 GMT+0300'
|
||||
- optional, offset from current time in seconds, after which cookie should expire; defaults to no offset. Possible values:
|
||||
- positive integer in seconds
|
||||
|
@ -1041,15 +1041,16 @@ Variadic parameters (must appears after required and optional parameters):
|
|||
Examples:
|
||||
- `example.com##+js(trusted-set-cookie, cmpconsent, 1-accept_1)`
|
||||
- `example.com##+js(trusted-set-cookie, cmpconsent, $now$)`
|
||||
- `example.com##+js(trusted-set-cookie, cmpconsent, '{"accepted":true,"expire":$now$}')`
|
||||
- `example.com##+js(trusted-set-cookie, cmpconsent, accept, 259200)`
|
||||
- `example.com##+js(trusted-set-cookie, cmpconsent, accept, 1year)`
|
||||
- `example.com##+js(trusted-set-cookie, cmpconsent, decline, , none)`
|
||||
|
||||
The second filter sets a cookie with `new Date().getTime()` value.
|
||||
The second and third filters will set a cookie with `new Date().getTime()` value.
|
||||
|
||||
The third and forth filters set a cookie which will expire in 3 days or 1 year.
|
||||
The forth and fifth filters will set a cookie which will expire in 3 days or 1 year.
|
||||
|
||||
The fifth filter sets a cookie with no path.
|
||||
The sixth filter sets a cookie with no path.
|
||||
|
||||
Also see: [set-cookie](#set-cookiejs-)
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user