Commit Graph

2022 Commits

Author SHA1 Message Date
Raymond Hill b1a00145bd
Mitigate potentially delayed execution of scriptlets in Firefox
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
2024-11-29 10:13:39 -05:00
Raymond Hill 703fdf673c
[mv3] Fix mv3 build script 2024-11-27 17:55:18 -05:00
Raymond Hill 4d525f1a55
Move `assets/resources` into `src/js/` 2024-11-27 16:47:11 -05:00
Raymond Hill e43cb6771a
[mv3] Open options page in tab in Firefox 2024-11-25 12:31:50 -05:00
Raymond Hill 50ddedb992
Import translation work from https://crowdin.com/project/ublock 2024-11-24 10:24:08 -05:00
Raymond Hill 346b5ded7c
[mv3] Add ability for admins to disable features
New managed setting:

"disabledFeatures": {
  "title": "User interface features to disable",
  "description": "A list of tokens, each of which correspond to a user interface feature to disable.",
  "type": "array",
  "items": { "type": "string" }
}

Supported tokens:
- `dashboard`: Prevent access to all dashboard settings
- `filteringMode`: Prevent changes to the default filtering mode,
  or the current filtering mode of any site

Related feedback:
https://github.com/uBlockOrigin/uBOL-home/discussions/35#discussioncomment-11326086
2024-11-23 13:17:13 -05:00
Raymond Hill 4979aa51f5
[mv3] Do not collect matched rules by default when side-loaded
Collecting matched rules when the extension is side-loaded is now
opt-in, by enabling "Developer mode" in the dashboard.

The reason is to allow the extension to behave same as the official
released version when side-loaded.

Specifically, as side-loaded extension, uBOL's service worker would
wake up due to matched-rule listener even though it would not wake
up the worker with same configuration in stable release.
2024-11-21 12:54:28 -05:00
Raymond Hill b2d7bb72c7
[mv3] Write log.txt file to extension folder 2024-11-20 12:55:13 -05:00
Raymond Hill 6355a17187
[mv3] Fix flaw breaking scriptlets injection in optimal/basic mode
Not all matching scriptlets were injected on a given site in Optimal
or Complete mode when default mode was set to Basic or less.

A high profile manifestation of this bug was that Youtube ads were
not being blocked when using Optimal on Youtube while default mode
was Basic.
2024-11-20 09:04:52 -05:00
Raymond Hill 3aac2a7c97
Import translation work from https://crowdin.com/project/ublock 2024-11-19 13:44:25 -05:00
Raymond Hill f3486275e9
[mv3] Fix force-reloading repeatedly when erroring at load time
Related issue:
https://github.com/uBlockOrigin/uBOL-home/issues/234
2024-11-19 13:16:56 -05:00
Raymond Hill 114acacd2e
[mv3] Batch changes thru dashboard UI to reduce worker's workload 2024-11-18 14:08:30 -05:00
Raymond Hill 17e0a35650
Import translation work from https://crowdin.com/project/ublock 2024-11-18 10:25:46 -05:00
Raymond Hill c95b08d760
Import translation work from https://crowdin.com/project/ublock 2024-11-18 10:24:08 -05:00
Raymond Hill d7c6b41992
[mv3] Code review re. re-worked dashboard
Related commit:
ae4754415c

Fine-tuned visuals; fixed sublist quirks related to admin-selected
lists.
2024-11-18 10:16:01 -05:00
Raymond Hill ae4754415c
[mv3] Re-work dashboard: move list of rulesets in its own pane
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
2024-11-17 17:27:27 -05:00
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