Scriptlets added:
- json-edit
- trusted-json-edit
- json-edit-xhr-response
- trusted-json-edit-xhr-response
- json-edit-fetch-response
- trusted-json-edit-fetch-response
- jsonl-edit-xhr-response
- trusted-jsonl-edit-xhr-response
- jsonl-edit-fetch-response
- trusted-jsonl-edit-fetch-response
These scriptlets are functionally similar to their `json-prune` counterpart,
except that they all use the new uBO-flavored JSONPath syntax, and the
`trusted-` versions allow to modify values instead of just removing them.
The `replace=` filter option has been extended to support applying
uBO-flavored JSONPath syntax to the response body. If the `replace=`
value starts with `json:` or `jsonl:`, the remaining of the value will
be interpreted as a JSONPath directive, which can be used to either
remove or modify property in a JSON document.
@description
Conditionally prevent assignment to `innerHTML` property.
@param [selector]
Optional. The element must matches `selector` for the prevention to take
place.
@param [pattern]
Optional. A pattern to match against the assigned value. The pattern can be
a plain string, or a regex. Prepend with `!` to reverse the match condition.
As discussed with filter list volunteers.
`generichide` option is implicitly enforced on all sites unless an
exception overrides `generichide`. Though rare, sometimes a
`generichide` exception needs to be overridden so that generic
cosmetic filtering is made possible on a specific site.
This commit is to add support for restoring generic cosmetic
filtering on sites which were excluded through a `generichide`
exception.
Concretely, this is needed to ensure the test suite can properly
verify that generic cosmetic filtering is working when the
filtering mode is set to "complete":
||ublockorigin.github.io^$generichide,important
Related issue:
https://github.com/uBlockOrigin/uBlock-issues/issues/3576
This is the first step, a trivial code change which disable the
injection of `Cache-Control` header in Firefox.
In the next dev cycle, the second step will be to remove all
the code related to `Cache-Control` injection.
New syntax for scriptlet-based filtering: it is now possible to
inject a scriptlet in a context according to whether an ancestor
origin matches a specific hostname. Example:
example.com>>##+js(set, iAmEmbeddedInExampleDotCom, true)
The new `>>` specifier means that the scriptlet will not be injected
in `example.com`, but will be injected in all direct and indirect
embedded contexts in pages loaded from `example.com`
The new ancestor domain specifier also works for entity directives:
example.*##+js(set, iAmEmbeddedInExampleDotEffectiveTLD, true)
This is an experimental feature, to be further evaluated and
discussed by filter list maintainers. This is not a complete
implementation, by choice. Do not open issues regarding this
new syntax, the current shortcomings are known.
The new syntax is being discussed internally at:
https://github.com/uBlockOrigin/uBlock-discussions/discussions/244