1
0
mirror of https://github.com/gorhill/uBlock.git synced 2024-11-17 07:52:42 +01:00
uBlock/platform/mv3
Raymond Hill c7b54af0a2
[mv3] Add minimal ability to diagnose ruleset issue
A new icon has been added to the popup panel, to open a popup
window with a terse list of DNR events for the current tab, in
reverse chronological order (most recent DNR event appears at
the top).

The new ability is available only when the extension is sideloaded,
as per `declarativeNetRequestFeedback` documentation. Ref:
https://developer.chrome.com/docs/extensions/reference/api/declarativeNetRequest#event-onRuleMatchedDebug

Purposefully minimal, so as to have something rather than nothing
when having to diagnose filtering issue with the DNR API. Example:
https://github.com/uBlockOrigin/uBOL-home/issues/156

The content of the popup window does not dynamically update, force
a refresh (F5) to get the most recent DNR events. This might be
improved in the future.

The DNR event buffer is not persisted, so the buffer is empty when
service worker is restarted. This might be improved in the future
by using session storage API.

There is no output filtering ability in this first draft. This
might be improved in the future.

DNR rules are reported. The filter from which a DNR rule
originates is not reported. Given that the rulesets are optimized
after conversion from original filter lists to reduce the DNR rule
count, this is unlikely to ever be possible.
2024-07-29 14:54:46 -04:00
..
chromium [mv3] Raise minimum chromium version to 118 2024-05-29 09:57:09 -04:00
description Import translation work from https://crowdin.com/project/ublock 2024-07-09 13:16:17 -04:00
extension [mv3] Add minimal ability to diagnose ruleset issue 2024-07-29 14:54:46 -04:00
firefox Add browser_specific_settings.gecko_android to Firefox manifests 2023-10-11 12:32:38 -04:00
scriptlets [mv3] Adjust as per changes in uBO base 2024-01-26 14:51:50 -05:00
make-rulesets.js [mv3] Raise minimum chromium version to 118 2024-05-29 09:57:09 -04:00
make-scriptlets.js Change official description in source code top comment 2023-12-04 12:10:34 -05:00
package.json Add experimental mv3 version 2022-09-06 13:47:52 -04:00
README.md Update README.md 2023-08-12 08:06:31 -04:00
safe-replace.js Change official description in source code top comment 2023-12-04 12:10:34 -05:00
salvage-ruleids.mjs Fix the salvaging of rule ids 2024-03-11 22:22:57 -04:00
ubo-version [mv3] Point to new uBO version 2023-08-20 08:54:32 -04:00

How to build MV3 uBO Lite

Instructions for reviewers.

The following assumes a linux environment.

  1. Open Bash console
  2. git clone https://github.com/gorhill/uBlock.git
  3. cd uBlock
  4. make mv3-[platform], where [platform] is either chromium or firefox
  5. This will fully build uBO Lite, and during the process filter lists will be downloaded from their respective remote servers

Upon completion of the script, the resulting extension package will become present in:

  • Chromium: dist/build/uBOLite.chromium
  • Firefox: dist/build/uBOLite.firefox

The folder dist/build/mv3-data will cache data fetched from remote server, so as to avoid fetching repeatedly from remote server with repeated build commands. Remove dist/build/mv3-data if you want to build with latest versions of filter lists.

The file dist/build/mv3-data/log.txt will contain information about what happened during the build process.

The entry in the Makefile which implement the build process is tools/make-mv3.sh [platform].[1] This Bash script copy various files from uBlock Origin branch and MV3-specific branch into a single folder which will be the final extension package.

Notably, tools/make-mv3.sh [platform] calls a Nodejs script which purpose is to convert the filter lists into various rulesets to be used in a declarative way. The Nodejs version required is 17.5.0 or above.

All the final rulesets are present in the dist/build/uBOLite.[platform]/rulesets in the final extension package.


[1] c4d324362f/tools/make-mv3.sh [2] c4d324362f/tools/make-mv3.sh (L103)