Commit Graph

2006 Commits

Author SHA1 Message Date
Raymond Hill 2e66d7bd55
Import translation work from https://crowdin.com/project/ublock 2024-11-14 10:40:55 -05:00
Raymond Hill 2e745f9bfb
[mv3] Remove obsolete Firefox-only workaround in scriptlet template
Related bugzilla issue:
https://bugzilla.mozilla.org/show_bug.cgi?id=1736575

The issue was fixed months ago.

The removed code block is causing uBOL to be flagged as "including
remotely hosted code".

To be clear, the removed obsolete code block was not related to
executing remote code. The referenced code was in the file itself,
not remote, and this was a workaround for when Firefox was not
supporting injecting script in the `MAIN` world.

The issue was fixed months ago in Firefox, so there is no point for
the workaround.
2024-11-13 09:10:51 -05:00
Raymond Hill 15dae359f7
[mv3] Add support to add/remove rulesets through policies
Related discussion:
https://github.com/uBlockOrigin/uBOL-home/discussions/35#discussioncomment-11157444

New policy setting: `rulesets`
Type: array
Type of array items: string

Each item in the list is a list id (as seen in `rulesets/ruleset-details.json`),
prefixed with either `+` to enable the ruleset, or `-` to disable the ruleset.

Users will not be able to enable or disable rulesets present in the `rulesets`
policy. Disabled rulesets will not appear in the dashboard.

Use `-*` to remove all non-default rulesets, except for those added
using `+[ruleset_id]`.

Additionally, some work has been done to properly handle policy changes in
a non-blocking and deferred manner, as I observed that it often takes long
for calls to `storage.manage.get` to resolve. This potentailly takes care
of the following issue:
https://github.com/uBlockOrigin/uBOL-home/issues/174
2024-11-11 13:20:54 -05:00
Raymond Hill 54ed02e302
Import translation work from https://crowdin.com/project/ublock 2024-11-05 09:25:01 -05:00
Raymond Hill d401527e83
Import translation work from https://crowdin.com/project/ublock 2024-10-31 11:28:06 -04:00
Raymond Hill ac4506091e
Import translation work from https://crowdin.com/project/ublock 2024-10-28 12:04:34 -04:00
Raymond Hill 9b3e94b23f
Import translation work from https://crowdin.com/project/ 2024-10-27 14:46:25 -04:00
Nadav Mermer 2782b16ecf Allow rulesets enabled in manifest.json to stay enabled when finding language defaults 2024-10-20 18:10:23 +03:00
Raymond Hill 0425bdfd35
Import translation work from https://crowdin.com/project/ublock 2024-10-17 12:44:02 -04:00
Raymond Hill 27f3612fdf
[mv3] Set Optimal as default if extension broad permission at install time
This is to prepare uBOL to be ready to set Optimal mode as default
if ever Chromium-based browsers support a way to pre-grant broad host
permissions in a policy.

Related issue:
https://github.com/uBlockOrigin/uBOL-home/discussions/232
https://github.com/uBlockOrigin/uBOL-home/discussions/135
2024-10-17 12:37:21 -04:00
Raymond Hill 89c353640e
[mv3] Add EST-0 list 2024-10-17 12:27:49 -04:00
Raymond Hill 2c60bb3b07
[mv3] Issue labels cannot be set client-side 2024-10-11 16:41:13 -04:00
Raymond Hill caba9cdefa
Use uBO's default listset 2024-10-11 09:03:30 -04:00
Raymond Hill 4aae1bdf47
Minor code review 2024-10-07 11:56:22 -04:00
Raymond Hill daa62c3081
Update README for npm package 2024-10-07 08:56:34 -04:00
Raymond Hill 9a286495a5
New npm version 2024-10-07 08:49:09 -04:00
Raymond Hill 34508a1c2d
Add demo.js to npm build
To help people to get quickly started with using the package.
2024-10-07 08:47:45 -04:00
Raymond Hill 26c0aa357e
New npm version 2024-10-07 07:38:41 -04:00
Raymond Hill 013e6db6ef
Fix typo 2024-10-06 17:05:44 -04:00
Raymond Hill acf7f39a60
New revision for npm package 2024-10-06 17:04:08 -04:00
Raymond Hill 86aeae75df
Further fix npm documentation, minor code review 2024-10-06 17:03:18 -04:00
Raymond Hill 9233e6b7c6
Fix npm documentation
Related issue:
https://github.com/uBlockOrigin/uBlock-issues/issues/3402
2024-10-06 16:29:42 -04:00
Raymond Hill 447476ab9b
New npm package version 2024-10-06 14:27:46 -04:00
Raymond Hill 818cb2d801
Fix npm test suite
Related commits:
- https://github.com/gorhill/uBlock/commit/02cba63331
- https://github.com/gorhill/uBlock/commit/41693407b2
2024-10-06 11:15:08 -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 d24ffe6bb8
Import translation work from https://crowdin.com/project/ublock 2024-10-04 12:30:37 -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 3d6984aeaf
Import translation work from https://crowdin.com/project/ublock 2024-09-29 17:06:51 -04:00
Raymond Hill c6baa2fb51
Import translation work from https://crowdin.com/project/ublock 2024-09-29 11:15:04 -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 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 4c5a9353b0
Import translation work from https://crowdin.com/project/ublock 2024-09-22 11:50:20 -04:00
Raymond Hill e7c783cefa
Code review for new DNS cache code
Prevent discarding DNS cache entries looked up during a passive
read. Related feedback:
https://github.com/uBlockOrigin/uBlock-issues/discussions/3376#discussioncomment-10711948

Add advanced setting `dnsCacheTTL` to control the TLL (in
seconds) of DNS cache entries. Default to 600 (10 minutes).
2024-09-22 10:02:45 -04:00
Raymond Hill f84b3e4ce9
Revert "Minor code review"
This reverts commit 76e035989f.
2024-09-20 17:52:31 -04:00
Raymond Hill 76e035989f
Minor code review 2024-09-20 11:40:03 -04:00
Raymond Hill 055973cc3f
Import translation work from https://crowdin.com/project/ublock 2024-09-20 09:16:32 -04:00
Raymond Hill 4f181b0bc5
Support matching against list of IP addresses
Related commit:
6acf97bf51
2024-09-20 07:20:55 -04:00
Raymond Hill 760b2ffce6
Add advanced setting `dnsResolveEnabled`
Default to `true`.

Set to `false` to wholly disable calls to `dns.resolve()` (Firefox-
only). Disabling calls to `dns.resolve()` will prevent cname-uncloaking
and will limit ability to enforce `ipaddress` filter option.
2024-09-19 08:43:54 -04:00
Raymond Hill 3238fe48db
Import translation work from https://crowdin.com/project/ublock 2024-09-17 17:48:45 -04:00
Raymond Hill 6a042f152b
Ignore browser-provided 0.0.0.0 ip address when DNS is proxied
Related issue:
https://github.com/uBlockOrigin/uBlock-issues/issues/3379
2024-09-17 10:26:40 -04:00
Raymond Hill b62aabda85
Import translation work from https://crowdin.com/project/ublock 2024-09-15 13:25:58 -04:00
Raymond Hill 93042eced4
Use dummy dns API when it's not present 2024-09-13 11:20:37 -04:00
Raymond Hill 73ee3ffe92
Code review of DNS-related code
Related commit:
6acf97bf51
2024-09-13 10:00:41 -04:00
Raymond Hill 8fadfb2c5e
Import translation work from https://crowdin.com/project/ublock 2024-09-12 15:40:24 -04:00
Raymond Hill 6acf97bf51
Rewrite cname uncloaking code to account for new `ipaddress=` option
This commit makes the DNS resolution code better suited for both
filtering on cname and ip address. The change allows early availability
of ip address so that `ipaddress=` option can be matched at
onBeforeRequest time.

As a result, it is now possible to block root document using
`ipaddress=` option -- so long as an ip address can be extracted
before first onBeforeRequest() call.

Related issue:
https://github.com/uBlockOrigin/uBlock-issues/issues/2792

Caveat
------

the ip address used is the first one among the list of ip
addresses returned by dns.resolve() method. There is no way for uBO
to know which exact ip address will be used by the browser when
sending the request, so this is at most a best guess. The exact IP
address used by the browser is available at onHeadersReceived time,
and uBO will also filter according to this value, but by then the
network request has already been sent to the remote server.

Possibly a future improvement would make available the whole list
of ip addresses to the filtering engine, but even then it's impossible
to know with certainty which ip address will ultimately be used by the
browser -- it is entirely possible that the ip address used by the
browser might not be in the list received through dns.resolve().
2024-09-12 11:19:57 -04:00