Raymond Hill
f7205fe2e4
Fine tune build steps
2022-09-07 10:23:40 -04:00
Raymond Hill
224410a6f5
Add per-site on/off switch to mv3 experimental version
2022-09-07 10:15:36 -04:00
Raymond Hill
a559f5f271
Add experimental mv3 version
...
This create a separate Chromium extension, named
"uBO Minus (MV3)".
This experimental mv3 version supports only the blocking of
network requests through the declarativeNetRequest API, so as
to abide by the stated MV3 philosophy of not requiring broad
"read/modify data" permission. Accordingly, the extension
should not trigger the warning at installation time:
Read and change all your data on all websites
The consequences of being permission-less are the following:
- No cosmetic filtering (##)
- No scriptlet injection (##+js)
- No redirect= filters
- No csp= filters
- No removeparam= filters
At this point there is no popup panel or options pages.
The default filterset correspond to the default filterset of
uBO proper:
Listset for 'default':
https://ublockorigin.github.io/uAssets/filters/badware.txt
https://ublockorigin.github.io/uAssets/filters/filters.txt
https://ublockorigin.github.io/uAssets/filters/filters-2020.txt
https://ublockorigin.github.io/uAssets/filters/filters-2021.txt
https://ublockorigin.github.io/uAssets/filters/filters-2022.txt
https://ublockorigin.github.io/uAssets/filters/privacy.txt
https://ublockorigin.github.io/uAssets/filters/quick-fixes.txt
https://ublockorigin.github.io/uAssets/filters/resource-abuse.txt
https://ublockorigin.github.io/uAssets/filters/unbreak.txt
https://easylist.to/easylist/easylist.txt
https://easylist.to/easylist/easyprivacy.txt
https://malware-filter.gitlab.io/malware-filter/urlhaus-filter-online.txt
https://pgl.yoyo.org/adservers/serverlist.php?hostformat=hosts&showintro=1&mimetype=plaintext
The result of the conversion of the filters in all these
filter lists is as follow:
Ruleset size for 'default': 22245
Good: 21408
Maybe good (regexes): 127
redirect-rule= (discarded): 458
csp= (discarded): 85
removeparams= (discarded): 22
Unsupported: 145
The fact that the number of DNR rules are far lower than the
number of network filters reported in uBO comes from the fact
that lists-to-rulesets converter does its best to coallesce
filters into minimal set of rules. Notably, the DNR's
requestDomains condition property allows to create a single
DNR rule out of all pure hostname-based filters.
Regex-based rules are dynamically added at launch time since
they must be validated as valid DNR regexes through
isRegexSupported() API call.
At this point I consider being permission-less the limiting
factor: if broad "read/modify data" permission is to be used,
than there is not much point for an MV3 version over MV2, just
use the MV2 version if you want to benefit all the features
which can't be implemented without broad "read/modify data"
permission.
To locally build the MV3 extension:
make mv3
Then load the resulting extension directory in the browser
using the "Load unpacked" button.
From now on there will be a uBlock0.mv3.zip package available
in each release.
2022-09-06 13:47:52 -04:00
Raymond Hill
1cd4cd8877
Add dependency on assets/resources
2021-09-11 09:16:20 -04:00
Raymond Hill
d41f28fcd8
Add median cost output to dig-snfe
2021-08-29 08:58:20 -04:00
Manish Jethani
2a130704e3
Add check-leaks make target ( #3837 )
2021-08-18 07:28:23 -04:00
Raymond Hill
8959cea3cc
Expose matchAndFetchModifiers() in npm package
...
Also, add instrumentation for the method in dig-snfe.
2021-08-17 12:48:39 -04:00
Manish Jethani
9a5a13a506
Add --full-battery option for tests ( #3834 )
2021-08-17 08:55:31 -04:00
Manish Jethani
f9655b9179
Run npm install in make-npm.sh ( #3831 )
2021-08-16 12:34:54 -04:00
Manish Jethani
30e46ba64a
Use symlink for node_modules ( #3830 )
2021-08-16 11:54:03 -04:00
Raymond Hill
8bb44242bd
Add platform "dig", to experiment/validate code changes
...
This is a replacement for the dubious approach when the
extension itself was used to run benchmarks to detect
performance and filtering behavior regressions.
2021-08-15 15:47:40 -04:00
Raymond Hill
087da6407d
Add support for nodejs flavors
...
The main nodejs flavor is "npm", which is to be used to
lint/test and the publication of an official npm
package -- and by design it has dependencies on mocha,
eslint, etc.
A new flavor "dig" has been created with minimal
dependencies and which purpose is to easily allow to
write specialized code to investigate local code changes
in uBO -- and it's not meant for publication.
Consequently, "make nodejs" has been replaced with
"make npm", and a new "dig" target has been added to the
makefile, to be used for instrumenting local code changes
for investigation purpose.
2021-08-15 10:43:36 -04:00
Manish Jethani
daff6b3a34
Add eslint dependency within Node.js package ( #3813 )
2021-08-13 06:43:20 -04:00
Manish Jethani
0d976d049c
Add test target to makefile ( #3810 )
2021-08-10 13:50:06 -04:00
Manish Jethani
a3f430ef03
Remove install-nodejs and related make targets ( #3809 )
2021-08-09 21:59:44 -04:00
Manish Jethani
4ea0d134ad
Move linting out of tools/make-nodejs.sh ( #3803 )
2021-08-04 14:40:20 -04:00
Raymond Hill
5237558f9b
Add build script as a dependency
...
Related discussion:
- https://github.com/gorhill/uBlock/pull/3789#issuecomment-891902206
2021-08-03 11:27:55 -04:00
Manish Jethani
3879835324
Remove bundle generation from Node.js package ( #3796 )
2021-08-02 09:17:56 -04:00
Manish Jethani
8a33bda653
Use lower case for Node.js package name ( #3792 )
2021-08-01 05:22:57 -04:00
Raymond Hill
4236d4a0c1
Fix `dist/build/uBlock0.nodejs.tgz` target as suggested
...
Related discussion:
- https://github.com/gorhill/uBlock/pull/3789#issuecomment-890410567
2021-07-31 18:36:31 -04:00
Raymond Hill
c89a320e7f
Add update-submodules as a target
2021-07-31 14:50:31 -04:00
Manish Jethani
43e77854c4
Add Makefile ( #3789 )
2021-07-31 08:41:28 -04:00