Commit graph

5036 commits

Author SHA1 Message Date
Raymond Hill
cef428e565
Import translation work from https://crowdin.com/project/ublock 2025-11-23 09:27:48 -05:00
Raymond Hill
9d76b9991f
Fix regression in prevent-fetch scriptlet
Related feedback:
https://github.com/uBlockOrigin/uAssets/pull/15692#issuecomment-3558272468
2025-11-20 09:32:54 -05:00
Raymond Hill
b46572e938
Improve prevent-fetch scriptlet
Related issue:
https://github.com/uBlockOrigin/uAssets/pull/15692#issuecomment-3538641262
2025-11-17 15:23:44 -05:00
Raymond Hill
474273ad92
Import translation work from https://crowdin.com/project/ublock 2025-11-10 10:28:12 -05:00
Raymond Hill
2e509d42fc
Fix regression in trusted-replace-argument scriptlet 2025-11-07 20:32:30 -05:00
Raymond Hill
6314b7f95e
Drop threaded serialization/deserialization 2025-11-06 10:45:42 -05:00
Raymond Hill
52fac1ea91
Import translation work from https://crowdin.com/project/ublock 2025-11-02 12:11:28 -05:00
Raymond Hill
a93072533d
Minor improvement of editInboundObjectFn scriptlet 2025-11-02 09:37:38 -05:00
Raymond Hill
cd0f5be12c
Add web-accessible resource for sensors analytics
Related discussion:
https://github.com/uBlockOrigin/uAssets/issues/30647#issuecomment-3477502513
2025-11-02 09:17:55 -05:00
Raymond Hill
b5f74456a4
Fix custom prefixes unduly assigning trust to external lists
Related discussion:
https://github.com/uBlockOrigin/uBlock-issues/issues/3843#issuecomment-3475894380
2025-11-01 13:00:05 -04:00
Raymond Hill
53d60ac36c
Improve m3u-prune scriptlet
Related feedback:
https://github.com/uBlockOrigin/uAssets/issues/30633#issuecomment-3475806340
2025-11-01 11:25:06 -04:00
Raymond Hill
2c5ae5113e
Import translation work from https://crowdin.com/project/ublock 2025-10-28 12:24:52 -04:00
Raymond Hill
60e15cb6e1
Improve prevent-fetch scriptlet
Related issue:
https://github.com/uBlockOrigin/uBlock-issues/issues/3828

Ability to set header values for the trusted version of the
scriptlet. Example:

..##+js(trusted-prevent-fetch, target, length:100, '{"headers":{"content-type": "image/png"}}')
2025-10-24 12:26:37 -04:00
Raymond Hill
8491e9c476
Fix regex-matching in JSONPath 2025-10-23 09:13:58 -04:00
Raymond Hill
50e898b847
Ignore negated request types when validating redirect option
Related issue:
https://github.com/uBlockOrigin/uBlock-issues/issues/3835
2025-10-20 09:14:22 -04:00
Raymond Hill
ae2f4da11f
Import translation work from https://crowdin.com/project/ublock 2025-10-19 10:58:41 -04:00
Raymond Hill
ede6b17060
Import translation work from https://crowdin.com/project/ublock 2025-10-12 12:59:07 -04:00
Raymond Hill
f9bb6d7f7e
Improve trusted-click-element scriptlet
Related feedback:
https://github.com/uBlockOrigin/uAssets/discussions/30340
2025-10-10 10:18:16 -04:00
Raymond Hill
4ee38a056e
Remove stray character 2025-10-04 12:53:07 -04:00
Raymond Hill
a43d1d8c42
Improve href-sanitizer scriptlet
Related issue:
https://github.com/uBlockOrigin/uBlock-issues/issues/3650
2025-10-04 10:22:47 -04:00
Raymond Hill
d376adaae8
Fix editInboundObjectFn utility scriptlet 2025-10-02 12:31:13 -04:00
Raymond Hill
d8ed2c2866
Update in-source code documentation 2025-10-02 12:30:06 -04:00
Raymond Hill
52bc354bce
Improve trusted-replace-argument scriptlet 2025-10-02 12:27:45 -04:00
Raymond Hill
f36d2b8496
Add ability to test against regex in JSONPath expressions
Related discussion:
https://github.com/uBlockOrigin/uAssets/issues/30157#issuecomment-3356048999
2025-10-01 11:35:15 -04:00
Raymond Hill
dd4f764920
Improve proxy-apply utility scriptlet 2025-10-01 09:21:43 -04:00
Raymond Hill
10e48d7ec5
Import translation work from https://crowdin.com/project/ublock 2025-09-27 12:31:08 -04:00
Raymond Hill
3e5ea3b03f
Fix removeparam for multiple query parameters with same name
Related issue:
https://github.com/uBlockOrigin/uAssets/issues/30090
2025-09-26 11:55:38 -04:00
Raymond Hill
34d202f79d
Import translation work from https://crowdin.com/project/ublock 2025-09-25 09:08:34 -04:00
Raymond Hill
4598ef3edc
Import translation work from https://crowdin.com/project/ublock 2025-09-24 10:48:18 -04:00
Raymond Hill
8af80be5b2
[mv3] Add dashboard pane to manage custom filters
Related issue:
https://github.com/uBlockOrigin/uBOL-home/issues/418
2025-09-24 10:42:18 -04:00
Raymond Hill
9aa91ba111
Improve trusted-click-element scriptlet
Related discussion/issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/2917
- https://github.com/uBlockOrigin/uAssets/discussions/30124

The "list of selectors" parameter is now a "list of steps". A step
can be:

- A selector, which tells the scriptlet to click a matching element. If
  no matching element is found, the scriptlet will wait for a matching
  element  to become available.
- An integer, which tells the scriptlet to wait n ms before processing
  the next step
- A directive, which is a string starting with `!` (not implemented yet)

If the last item in the list is an integer, this tells the scriplet to
override the built-in timeout value of 10s, such that the life time of
the scriptlet can now be extended beyond 10s.

Example:

  ..##+js(trusted-click-element, '1000, a, 500, b, c, 15000')

The scriptlet filter above will perform the following steps, in order:

- Prepare the scriptlet to timeout at 15s from now
- Wait 1000 ms
- Wait for element `a` to become available then click on it
- Wait 500 ms
- Wait for element `b` to become available then click on it
- Wait for element `c` to become available then click on it
- Abort if all the steps cannot be completed before 15s

The changes keep compatiblity with older syntax or with AdGuard
syntax.
2025-09-22 18:50:58 -04:00
Raymond Hill
705e6329eb
Import translation work from https://crowdin.com/project/ublock 2025-09-22 12:46:13 -04:00
Raymond Hill
8de47f250d
Improve google-ima shim
Related issue:
https://github.com/uBlockOrigin/uAssets/issues/30134
2025-09-22 10:41:36 -04:00
Raymond Hill
889c0eb208
Fix potential infinite loop when scanning for $ anchor
Related issue:
https://github.com/uBlockOrigin/uBlock-issues/issues/3799

An infinite loop in the network filter parser was triggered when
the following conditions were fulfilled:

- There was a network option `$` anchor
- There were only whitespace character(s) preceding the anchor
- There was an invalid filter option following the anchor
2025-09-15 09:26:09 -04:00
Raymond Hill
30e5e8c8ce
Remove obsolete code 2025-09-08 14:09:55 -04:00
Raymond Hill
52dba4116e
Allow generic exception for replace= option
Related issue:
https://github.com/uBlockOrigin/uBlock-issues/issues/3791
2025-09-08 07:32:03 -04:00
Raymond Hill
0936b9b8b7
Import translation work from https://crowdin.com/project/ublock 2025-09-06 08:23:05 -04:00
Raymond Hill
d2bce26e7d
Improve prevent-fetch scriptlet
Add vararg `throttle, n` where `n` is the time to wait in ms before
returning a response from proxied `fetch()`.

As discussed with filter list maintainers.
2025-09-02 10:00:27 -04:00
Raymond Hill
64858e9b9e
Minor 2025-08-30 09:58:33 -04:00
Raymond Hill
17c6334cbd
Import translation work from https://crowdin.com/project/ublock 2025-08-30 09:15:19 -04:00
Raymond Hill
6327aae56c
Add support to strict-block from ipaddress= option
As discussed with filter list maintainers.
2025-08-28 11:13:43 -04:00
Raymond Hill
5d7e5ee3a0
Improve rendering with high-contrast theme
Related issue:
https://github.com/uBlockOrigin/uBlock-issues/issues/3385
2025-08-20 11:02:35 -04:00
Raymond Hill
807d1b6cdb
Fix checkbox visual when using high contrast
Related issue:
https://github.com/uBlockOrigin/uBlock-issues/issues/3385
2025-08-19 11:50:58 -04:00
Raymond Hill
4814992c54
Import translation work from https://crowdin.com/project/ublock 2025-08-17 10:27:46 -04:00
Raymond Hill
9327e19233
Fix undue fetch from remote server at first install
Related issue:
https://github.com/uBlockOrigin/uBlock-issues/issues/3761

Regression from:
69fce3aa6e
2025-08-17 08:01:51 -04:00
Raymond Hill
60ab2ad59c
Fix regression in static filtering parser
Related commit:
aaf35d9d71
2025-08-16 09:06:25 -04:00
Raymond Hill
aaf35d9d71
Improve compatibility of uritransform= with DNR syntax
The `uritransform=` option will now be converted to a proper DNR
rule when the following condition are fulfilled:

- The value of the `uritransform` option matches `//[replacement]/`,
i.e. the pattern to match is empty, and only the replacement part is
provided.

- The filter pattern is a regex.

Is such case, the DNR rule will be a `redirect` making use of the
`regexSubstitution` property.

In case the above conditions are not fulfilled, the filter will
be discarded as incompatible with DNR syntax (as was the case
before).

This is potentially a breaking change, in cases where a filter
assumed that the part to match was the start of the path part of
a URL.

A reminder that `uritransform` is an option which requires a
trusted source, otherwise it is rejected.
2025-08-15 15:55:33 -04:00
Raymond Hill
07e9f805bb
Allow usage of csp=/permissions= with resource type object
Related issue:
https://github.com/uBlockOrigin/uBlock-issues/issues/3746
2025-08-10 09:22:17 -04:00
Raymond Hill
faff035203
JSONPath: Add ability to select root node for appending/modifying
As discussed with filter list maintainers.

Examples of usage:

  $ => result is `null`
  $+={"modifyOrCreate": "..."}

These expressions were not working with previous version.
2025-08-09 13:56:02 -04:00
Raymond Hill
38ca6d41ff
JSONPath: Add ability to substitute a pattern within a string value
As discussed with filter list maintainers.

Examples of JSON path expression to replace a pattern within a string
value:

  ..book.*.author=repl({"pattern": "Melville", "replacement": "Toto"})
  ..book.*.author=repl({"regex": "e", "replacement": "o"})
  ..book.*.author=repl({"regex": "e", "flags": "g", "replacement": "o"})

If the target value is not a string, no modification will occur.
2025-08-09 11:05:27 -04:00