Related issue: https://github.com/uBlockOrigin/uBOL-home/issues/157 The `header=` option will be converted into DNR's `responseHeaders` condition. There will be an attempt to convert regex-based values into DNR- compatible syntax. Not all regex-based patterns can be converted to use DNR's patterns with `*` and `?` special characters. The implementation of `header=` option in uBO has been revisited to improve compatibility with DNR syntax to minimize burden for list maintainers when creating `header=` filters compatible with both uBO and uBOL. The changes: - Header names are now case-insensitive by default - Occurrences of `*` in non-regex-based header values now mean "matches any number of characters" - Occurrences of `?` in non-regex-based header values now mean "matches zero or one character" At time of commit, and as per MDN, only Chromium-based browsers currently support filtering on repsonse headers: https://developer.mozilla.org/docs/Mozilla/Add-ons/WebExtensions/API/declarativeNetRequest/HeaderInfo Also as per MDN, Chromium 121-127 silently ignore the `responseHeaders` condition, potentially causing undue blocking of network requests. Currently uBOL support Chromium 122 and later, meaning we need to mind potential false positives in Chromium 122-127 for filters using `header=` option. |
||
|---|---|---|
| .. | ||
| chromium | ||
| description | ||
| edge | ||
| extension | ||
| firefox | ||
| safari | ||
| scriptlets | ||
| make-rulesets.js | ||
| make-scriptlets.js | ||
| package.json | ||
| README.md | ||
| rulesets.json | ||
| safe-replace.js | ||
| salvage-ruleids.mjs | ||
How to build MV3 uBO Lite
Instructions for reviewers.
The following assumes a linux environment.
- Open Bash console
git clone https://github.com/gorhill/uBlock.gitcd uBlockmake mv3-[platform], where[platform]is eitherchromium,edge,firefox, orsafari- 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 - Edge:
dist/build/uBOLite.edge - Firefox:
dist/build/uBOLite.firefox - Safari:
dist/build/uBOLite.safari
The folder dist/build/mv3-data will cache data fetched from remote servers, so as to avoid fetching repeatedly from remote servers with repeated build commands. Use make cleanassets to remove all locally cached filter lists 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.