Commit Graph

12713 Commits

Author SHA1 Message Date
Raymond Hill 1f45902a61
Make Firefox dev build auto-update 2024-10-05 16:21:29 -04:00
Raymond Hill 4775c9cb45
New revision for dev build 2024-10-05 16:10:03 -04:00
Raymond Hill 4c1b1d4cdb
Update changelog 2024-10-05 16:09:41 -04:00
Raymond Hill 64b2086ba4
Add ability to lookup parameter name in `urlskip=`
Relate case:
https://github.com/uBlockOrigin/uBlock-issues/issues/3206#issuecomment-2395121619

Newly supported step: `&i`, meant to lookup a parameter's name at
position `i` (1-based). The parameter name will be used as the
URL (whereas `?` is meant to lookup a parameter's value).
2024-10-05 14:59:43 -04:00
Raymond Hill 02cba63331
Partially revert 4169340 2024-10-05 14:51:38 -04:00
Raymond Hill 5f2ee6caf8
Make Firefox dev build auto-update 2024-10-05 14:00:44 -04:00
Raymond Hill 73404e5988
New revision for dev build 2024-10-05 13:30:49 -04:00
Raymond Hill 5145747ac7
Update chengelog 2024-10-05 13:30:18 -04:00
Raymond Hill 6d2b3375f8
Mind that BroadcastChannel contructor can throw in Firefox
BroadcastChannel constructor throws in Firefox when Enhanced
Tracking Protection is set to "strict".

This behavior could cause scriptlet injection to wholly break
when uBO's logger was opened, as BroadcastChannel() is used
by scriptlets to report information to the logger.

This commit ensures that exceptions from BroadcastChannel
constructor are properly handled.

The scriptlets will fall back to report at the console should
they be unable to report to the logger through BroadcastChannel.
2024-10-05 12:42:30 -04:00
Raymond Hill 41693407b2
Fix npm test suite
Ensure serialization returns copy of data rather than live
references to data. This allows to immediately deserialize() the
result of serialize().

Also, adjust code to modified behavior of filterQuery().
2024-10-05 11:32:59 -04:00
Raymond Hill 3b53d8e5b7
Update changelog 2024-10-05 08:43:14 -04:00
Raymond Hill 95b0ce5e3a
Add `trusted-override-element-method` scriptlet
@description
Override the behavior of a method on matching elements.

@param methodPath
The method which calls must be intercepted.

@param [selector]
A CSS selector which the target element must match. If not specified,
the override will occur for all elements.

@param [disposition]
How the override should be handled. If not specified, the overridden call
will be equivalent to an empty function. If set to `throw`, an exception
will be thrown. Any other value will be validated and returned as a
supported safe constant.

@example
..##+js(trusted-override-element-method, HTMLAnchorElement.prototype.click, a[target="_blank"][style])
2024-10-05 08:35:43 -04:00
Raymond Hill a0a33eb9b9
Code review for new `trusted-prevent-dom-bypass` scriptlet
Related commit:
https://github.com/gorhill/uBlock/commit/1abc864742
2024-10-05 07:41:44 -04:00
Raymond Hill 05ba71aef0
Make Firefox dev build auto-update 2024-10-04 13:30:54 -04:00
Raymond Hill d24ffe6bb8
Import translation work from https://crowdin.com/project/ublock 2024-10-04 12:30:37 -04:00
Raymond Hill fccda96bd7
New revision for dev build 2024-10-04 12:28:25 -04:00
Raymond Hill 5e2f94bebc
New revision for dev build 2024-10-04 12:27:57 -04:00
Raymond Hill 1abc864742
Add `trusted-prevent-dom-bypass` scriptlet
@description
Prevent the bypassing of uBO scriptlets through anonymous embedded context.

To ensure that a target method in the embedded context is using the
corresponding parent context's method (which is assumed to be
properly patched), or to replace the embedded context with that of the
parent context.

Root issue:
https://issues.chromium.org/issues/40202434

@param methodPath
The method which calls must be intercepted. The arguments
of the intercepted calls are assumed to be HTMLElement, anything else will
be ignored.

@param selector (optional)
A plain CSS selector which will be used in a `document.querySelector()`
call, to validate that the returned element must be processed by the
scriptlet. If no selector is provided, all elements will be processed.

@param targetMethod (optional)
The method in the embedded context which should be delegated to the
parent context. If no method is specified, the embedded context becomes
the parent one, i.e. all  properties of the embedded context will be that
of the parent context.
2024-10-04 12:24:35 -04:00
Raymond Hill 5133991f7e
Fix spurious error in content script
No guarantee vAPI.bootstrap will still be present when callback
executes.
2024-10-04 08:57:10 -04:00
Ilya (Marshal) 9f4123a4e2
Fix AdGuard Knowledge Base URLs 2024-10-04 11:27:24 +02:00
Raymond Hill 8196b99e9d
Make Firefox dev build auto-update 2024-10-03 13:51:14 -04:00
Raymond Hill 89a1fd5b0e
New revision for dev build 2024-10-03 13:42:24 -04:00
Raymond Hill f3bc426a57
Update changelog 2024-10-03 13:42:03 -04:00
Raymond Hill fe49ced2ac
Imrpove `prevent-xhr` scriptlet; add `trusted-prevent-xhr` scriptlet
Add support for synchronous `send()` calls.

`trusted-prevent-xhr` is essentially the same as `prevent-xhr` except
that if the `directive` argument is not a known token, it will be
used as is as the response text of the xhr request, whereas `prevent-xhr`
returns an empty string when the directive is unknown.
2024-10-03 13:31:52 -04:00
Raymond Hill bcb31db176
Update changelog 2024-10-02 15:11:26 -04:00
Raymond Hill b25d2153af
Make Firefox dev build auto-update 2024-10-02 15:05:42 -04:00
Raymond Hill ce8cc4793c
Update changelog 2024-10-02 14:58:39 -04:00
Raymond Hill 99593f82f4
New revision for dev build 2024-10-02 14:58:31 -04:00
Raymond Hill 4305bfbdb1
Skip dns resolution when requests are proxied through http
Related issue:
https://github.com/uBlockOrigin/uBlock-issues/discussions/3396

Reference:
https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/proxy/ProxyInfo#type_2
2024-10-02 14:51:26 -04:00
Raymond Hill 73ce4e6bcf
Blocking large media elements also prevents autoplay, regardless of size
Related issue:
https://github.com/uBlockOrigin/uBlock-issues/issues/3394

When the "No large media elements" per-site switch is toggled on,
it will also act to prevent autoplay of video/audio media, regardless
of their size. This also works for xhr-based media streaming.

If blocking by size is not desirable while blocking autoplay is
desired, one can toggle on "No large media elements" switch while
setting "Block media elements larger than ..." to a very high value.
2024-10-02 13:39:36 -04:00
Raymond Hill 0b02c7ccb6
Import translation work from https://crowdin.com/project/ublock 2024-10-01 12:27:56 -04:00
Raymond Hill 6cac645830
Do not discard `!#else` block for unknown preprocessor tokens
Related issue:
https://github.com/uBlockOrigin/uBlock-issues/issues/3393
2024-09-30 10:16:48 -04:00
Raymond Hill 3d6984aeaf
Import translation work from https://crowdin.com/project/ublock 2024-09-29 17:06:51 -04:00
Raymond Hill 63cf3dc959
Make Firefox dev build auto-update 2024-09-29 12:50:55 -04:00
Raymond Hill c6baa2fb51
Import translation work from https://crowdin.com/project/ublock 2024-09-29 11:15:04 -04:00
Raymond Hill 7a9481b5a5
New revision for dev build 2024-09-29 10:57:12 -04:00
Raymond Hill a2f81f19ff
Update changelog 2024-09-29 10:56:54 -04:00
Raymond Hill e81e70937f
Add ability to decode base64 in `urlskip=`
Related case:
https://github.com/uBlockOrigin/uAssets/issues/25467

New step: `-base64`
Purpose: to decode base64-encoded output of previous step
2024-09-29 10:51:56 -04:00
Raymond Hill 7f117e8d21
Import translation work from https://crowdin.com/project/ublock 2024-09-28 14:14:26 -04:00
Raymond Hill 99191d1363
Import translation work from https://crowdin.com/project/ublock 2024-09-28 14:12:13 -04:00
Raymond Hill 560def639f
[mv3] Add a _chat_ icon in popup panel to report filter issues
Just the same as with uBO, but for uBOL.
2024-09-28 14:08:42 -04:00
Raymond Hill dcb86e3667
Update README.md 2024-09-27 11:04:42 -04:00
Raymond Hill 5425ac2375
Make Firefox dev build auto-update 2024-09-26 13:40:44 -04:00
Raymond Hill 7b585a733a
New revision for dev build 2024-09-26 13:32:50 -04:00
Raymond Hill 82ab15f856
Update changelog 2024-09-26 13:32:24 -04:00
Raymond Hill aec0bd39e3
Fix images not properly downloading on click
Related feedback:
https://github.com/uBlockOrigin/uBlock-issues/issues/1670#issuecomment-2372048056

The issue affected images supporting `srcset` attribute without
the presence of `src` attribute. This commit takes add fallback
onto `srcset` attribute when the `src` attribute is not present.
2024-09-26 13:27:06 -04:00
Raymond Hill 03df1a40d8
New version for stable release 2024-09-26 10:13:24 -04:00
Raymond Hill ff57f01026
Code review of fix re "internal error"
Related issue:
https://github.com/uBlockOrigin/uBOL-home/issues/199
2024-09-22 12:14:52 -04:00
Raymond Hill 687475ebf2
Make Firefox dev build auto-update 2024-09-22 12:01:33 -04:00
Raymond Hill 854c1ee4cc
New revision for release candidate 2024-09-22 11:53:54 -04:00