Related feedback:
https://github.com/uBlockOrigin/uBlock-issues/issues/760#issuecomment-2540436382
Using quotes in filter option values is meant to remove ambiguity
when the value contains special characters. This was not working when
the value started with `$`. For example, fixes usage of quotes in:
$removeparam='$deep_link'
Also, fixed logger output for scriptlets using empty parameters
in quotes.
Related issue:
https://github.com/uBlockOrigin/uBOL-home/issues/254
Cosmetic filters with only negated hostnames would end up being
classified as specific, while in reality the filter is generic, with
specific exceptions.
This commit fixes the improper classification. Enforcing specific
exception filters in the generic realm is still an issue to
address.
Add information about which ruleset caused a page to be strict-
blocked.
Whenever possible, add ability to URL-skip an incoming redirect
in a strict-blocked page.
Add new default list: "30-day Phishing Domain List"
Related issue:
https://github.com/uBlockOrigin/uBOL-home/issues/214
This implements basic functionality for strict blocking, i.e. the
ability to block navigation to undesirable websites. This is a
first implementation, which converts only filters that are plain
hostnames.
Unlike with uBO, it is not possible to know from which ruleset a
blocking rule originates. Nonetheless, users will have to make a
choice as to whether navigation should proceed or not.
A setting has been added to the dashboard to wholly enable/disable
strict blocking. It is enabled by default.
Potential future improvements, pending investigation on feasability
in an MV3 framework:
- Extend coverage to explicit `document` filters
- Leverage and use `urlskip=` filters in the blocking page in order
to proceed while bypassing unwanted redirects.
Related issue:
https://github.com/uBlockOrigin/uBlock-issues/issues/3452
Use blob-based injection only when direct injection fails because
of a page's CSP. This is a mitigation until a better approach is
devised.
Such future better approach to investigate:
- Use `MAIN` world injection supported by contentScript.register()
since Firefox 128
- Investigate registering script to inject ahead of time thru
some heuristic
Add support for range for the `delay` paramater:
---
@param [delay]
A value to match against the delay. Can be a single value for exact match,
or a range:
- `min-max`: matches if delay >= min and delay <= max
- `min-`: matches if delay >= min
- `-max`: matches if delay <= max
No delay means to match any delay value.
Prepend with `!` to reverse the match condition.
---
As discussed with filter list maintainers.
As discussed with filter list maintainers, added ability to
partially replace an argument using the `repl:` prefix. Updated
documentation:
---
@scriptlet trusted-replace-argument.js
@description
Replace an argument passed to a method. Requires a trusted source.
@param propChain
The property chain to the function which argument must be replaced when
called.
@param argposRaw
The zero-based position of the argument in the argument list. Use a negative
number for a position relative to the last argument.
@param argraw
The replacement value, validated using the same heuristic as with the
`set-constant.js` scriptlet.
If the replacement value matches `json:...`, the value will be the
json-parsed string after `json:`.
If the replacement value matches `repl:/.../.../`, the target argument will
be replaced according the regex-replacement directive following `repl:`
@param [, condition, pattern]
Optional. The replacement will occur only when pattern matches the target
argument.
---
Aditionally, more scriptlets moved into their own files.
Related issue:
https://github.com/uBlockOrigin/uBOL-home/issues/229
Add "Filter lists" pane in dashboard
The DNR API now supports enabling 50 static rulesets put of a
maximum of 100 (instead of 10 out of 50 originally). Thus given
the potentially growing number of static rulesets, the available
stock rulesets has been moved to its own pane, with the following
improvements:
- Support sublists
- Support search
Aditionally, "RU AdList: Counter" has been added as a stock
ruleset.
Other changes:
- Do not re-evaluate regexes which failed validation
- Better reduce `removeparam` rules
Potentially breaking change:
`urlskip=` option will no longer apply by default to blocked network
requests, only network requests which are not blocked can be skipped
through a `urlskip=` filter.
The new `urlskip=` directive `-blocked` can be used to explicitly
allow a `urlskip=` filter to also apply to blocked network requests.
Example: given the filter `||example.com^`, the filter:
||example.com/path/to/tracker$urlskip=?url
Will not prevent strict-blocking when navigating to:
https://example.com/path/to/tracker?url=https://example.org/
However, the filter:
||example.com/path/to/tracker$urlskip=-blocked ?url
Will cause the strict-blocking to be ignored and allow navigation
to proceed to the URL extracted as a result of applying the `urlskip=`
filter:
https://example.org/
Related discussion:
https://github.com/uBlockOrigin/uBlock-issues/issues/3206#issuecomment-2439627386