Skip to content

Commit 996f1e0

Browse files
author
Atlassian Bamboo
committed
deploy: update docs for v2.2.13
1 parent 4e8a32d commit 996f1e0

2 files changed

Lines changed: 12 additions & 3 deletions

File tree

wiki/about-scriptlets.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3372,7 +3372,7 @@ example.org#%#//scriptlet('set-cookie-reload', name, value[, path[, domain]])
33723372
- `accept`/ `accepted` / `notaccepted`
33733373
- `reject` / `rejected`
33743374
- `allow` / `allowed`
3375-
- `disallow` / `deny`
3375+
- `disallow` / `deny` / `denied`
33763376
- `enable` / `enabled`
33773377
- `disable` / `disabled`
33783378
- `necessary` / `required`
@@ -3437,7 +3437,7 @@ example.org#%#//scriptlet('set-cookie', name, value[, path[, domain]])
34373437
- `accept`/ `accepted` / `notaccepted`
34383438
- `reject` / `rejected`
34393439
- `allow` / `allowed`
3440-
- `disallow` / `deny`
3440+
- `disallow` / `deny` / `denied`
34413441
- `enable` / `enabled`
34423442
- `disable` / `disabled`
34433443
- `necessary` / `required`

wiki/about-trusted-scriptlets.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1047,7 +1047,10 @@ example.org#%#//scriptlet('trusted-set-constant', property, value[, stack])
10471047

10481048
- `property` — required, path to a property (joined with `.` if needed). The property must be attached to `window`.
10491049
- `value` — required, an arbitrary value to be set; value type is being inferred from the argument,
1050-
e.g '500' will be set as number; to set string type value wrap argument into another pair of quotes: `'"500"'`;
1050+
e.g '500' will be set as number; simple strings that do not match
1051+
other types are automatically set as strings, e.g 'yes', 'no', 'allow';
1052+
to set string type value that looks like other types,
1053+
wrap argument into another pair of quotes, e.g. `'"500"'` for a string;
10511054
- `stack` — optional, string or regular expression that must match the current function call stack trace;
10521055
if regular expression is invalid it will be skipped
10531056

@@ -1077,6 +1080,12 @@ example.org#%#//scriptlet('trusted-set-constant', property, value[, stack])
10771080
! Set array or object as property value, argument should be a JSON string
10781081
example.org#%#//scriptlet('trusted-set-constant', 'click_r', '[1,"string"]')
10791082
example.org#%#//scriptlet('trusted-set-constant', 'click_r', '{"aaa":123,"bbb":{"ccc":"string"}}')
1083+
1084+
! Set simple string value without quotes
1085+
example.org#%#//scriptlet('trusted-set-constant', 'test', 'no')
1086+
1087+
✔ window.test === 'no'
1088+
✔ typeof window.test === 'string'
10801089
```
10811090
10821091
1. Use script stack matching to set value

0 commit comments

Comments
 (0)