Skip to content

Commit

Permalink
Add trusted-set-constant scriptlet
Browse files Browse the repository at this point in the history
Alias: `trusted-set`

Behaves exactly like set-constant, except that any arbitrary JSON-
compatible value can be set.

By default the value is treated as a string, which can be anything.

If the value starts with `{` and ends with `}`, the value will be
JSON-parsed, and the `value` property of the resulting object will
be used.

As with any scriptlet requiring trust, filters using
`trusted-set-constant` can only come from trusted filter lists,
otherwise they are discarded.

Related discussion:
- uBlockOrigin/uAssets#18185 (comment)
  • Loading branch information
gorhill committed May 23, 2023
1 parent d74c73e commit 19cdd50
Showing 1 changed file with 222 additions and 183 deletions.

0 comments on commit 19cdd50

Please sign in to comment.