1
0
mirror of https://github.com/gorhill/uBlock.git synced 2024-11-17 16:02:33 +01:00
Commit Graph

9149 Commits

Author SHA1 Message Date
Raymond Hill
c6d275674d
Revert "Make the nodejs package load a serialized version of the PSL"
This reverts commit 46c6ff8708.
2021-08-01 15:42:46 -04:00
Raymond Hill
46c6ff8708
Make the nodejs package load a serialized version of the PSL
Related discussion:
- https://github.com/cliqz-oss/adblocker/pull/2091#issuecomment-890545926
2021-08-01 12:58:21 -04:00
Manish Jethani
8a33bda653
Use lower case for Node.js package name (#3792) 2021-08-01 05:22:57 -04:00
Raymond Hill
e8122263dc
Merge branch 'master' of https://github.com/gorhill/uBlock 2021-07-31 18:37:15 -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
Manish Jethani
be68a6b5b4
Use set -e in Bash scripts (#3791) 2021-07-31 17:34:25 -04:00
Raymond Hill
43b7cc37e0
Make Firefox dev build auto-update 2021-07-31 14:55:58 -04:00
Raymond Hill
03f4ac77da
Update to current state of uAssets 2021-07-31 14:51:10 -04:00
Raymond Hill
c89a320e7f
Add update-submodules as a target 2021-07-31 14:50:31 -04:00
Raymond Hill
6fa8ae619d
Revert "Pass -e flag to bash (#3790)"
This reverts commit bb20159495.
2021-07-31 14:49:32 -04:00
Raymond Hill
77bff031a5
new revision for dev build 2021-07-31 14:40:55 -04:00
vt
2b9aba2748 Handle invalid meta refresh URLs in noscript scriptlet
Invalid URLs like "http://" and "http://foo@" trigger TypeErrors
when they are passed to the URL constructor. These TypeErrors
caused the scriptlet to stop processing subsequent noscript nodes
due to uncaught exceptions.

These exceptions are now caught to allow all noscript nodes to
be processed.
2021-07-31 13:16:33 -04:00
Manish Jethani
bb20159495
Pass -e flag to bash (#3790) 2021-07-31 12:15:32 -04:00
Raymond Hill
de1feb0948
Fix make-nodejs
Broken due to renaming text-iterators to text-utils.
2021-07-31 08:59:55 -04:00
Manish Jethani
43e77854c4
Add Makefile (#3789) 2021-07-31 08:41:28 -04:00
Raymond Hill
cb72211795
Move orphanizeString() into text-utils module
Another small step toward the goal of reducing dependency
on `µb`.

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

text-iterators module has been renamed text-utils to better
reflect its content.
2021-07-31 08:38:33 -04:00
Raymond Hill
2eb02c5adc
Fix spurious error message in dev console
Ports can be disconnected under certain conditions,
and in such case runtime.lastError must be accessed
to avoid the extensions framework from emitting
error messages in the console.
2021-07-31 07:20:38 -04:00
Raymond Hill
dc08478130
Fix https://github.com/uBlockOrigin/uBlock-issues/issues/1675 2021-07-31 07:15:19 -04:00
Raymond Hill
23cabfd440
Fix erroneous removal of code from pslInit() 2021-07-31 07:09:01 -04:00
Raymond Hill
d5da88ea87
Simplify loading of WASM modules in nodejs 2021-07-31 07:06:11 -04:00
Raymond Hill
5be4d5d877
Make pslInit() returns the publicSuffixList instance used internally
Related discussion:
- https://github.com/uBlockOrigin/uBlock-issues/issues/1664#issuecomment-889647595
2021-07-30 07:00:45 -04:00
Raymond Hill
a58a093d90
Make Firefox dev build auto-update 2021-07-29 17:11:42 -04:00
Raymond Hill
98dd03b09b
New revision for dev build 2021-07-29 17:05:19 -04:00
Raymond Hill
076a088371
Remove stray async 2021-07-29 17:04:32 -04:00
Raymond Hill
98fc66bb1b
Add support for enabling WASM code paths in NodeJS package
See `test.js` for reference on how to enable WASM code
paths (which are disabled by default).
2021-07-29 16:54:51 -04:00
Raymond Hill
b02970f5ee
Add command to update submodules 2021-07-29 11:46:35 -04:00
Raymond Hill
5ce30d7163
Update submodules 2021-07-29 11:39:11 -04:00
Raymond Hill
0757c44552
Update submodules 2021-07-29 11:31:48 -04:00
Manish Jethani
63591ef2aa Make uAssets a submodule 2021-07-29 19:36:49 +05:30
Raymond Hill
5560071468
Make Firefox dev build auto-update 2021-07-29 09:21:16 -04:00
Raymond Hill
0c326b3b89
New revision for dev build 2021-07-29 09:06:08 -04:00
Raymond Hill
1257dda47f
Import translation work from https://crowdin.com/project/ublock 2021-07-29 09:03:03 -04:00
Raymond Hill
3488e6d5ba
Merge branch 'master' of https://github.com/gorhill/uBlock into 1664 2021-07-29 08:54:48 -04:00
Raymond Hill
8ef8c5ab2e
Group all benchmarking functions in a separate file
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/1664

The various filtering engine benchmarking functions are best
isolated in their own file since they have specific
dependencies that should not be suffered by the filtering
engines.

Additionally, moved decomposeHostname() into uri-utils.js
as it's a hostname-related function required by many
filtering engine cores -- this allows to further reduce
or outright remove dependency on `µb`.
2021-07-29 08:44:15 -04:00
Raymond Hill
62b6826dd5
Further modularize uBO's codebase
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/1664

Modularization is a necessary step toward possibly publishing
a more complete nodejs package to allow using uBO's filtering
capabilities outside of the uBO extension.

Additionally, as per feedback, remove undue usage of console
output as per feedback:
- https://github.com/uBlockOrigin/uBlock-issues/issues/1664#issuecomment-888451032
2021-07-28 19:48:38 -04:00
Raymond Hill
d7cd6d72f6
Build/release a nodejs package in tagged releases
Related issue:
- https://github.com/cliqz-oss/adblocker/pull/2075
2021-07-28 19:43:11 -04:00
Raymond Hill
09db8803c5
Remove requirement of uAssets presence to build a package
Related discussion:
- https://github.com/cliqz-oss/adblocker/pull/2075#discussion_r678654293
2021-07-28 19:40:11 -04:00
Raymond Hill
4612bfdbac
Make Firefox dev build auto-update 2021-07-28 13:11:09 -04:00
Raymond Hill
2f53a1a11e
New revision for dev build 2021-07-28 13:07:01 -04:00
Raymond Hill
ee0b2c2fa4
Do not truncate datalayer
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/1671

Regression from:
- 0dbe581c5b
2021-07-28 12:45:03 -04:00
Raymond Hill
e1222d1643
Use require instead of fs
Related feedback:
- https://github.com/uBlockOrigin/uBlock-issues/issues/1664#issuecomment-888332409
2021-07-28 10:38:24 -04:00
Raymond Hill
22022f636f
Modularize codebase with export/import
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/1664

The changes are enough to fulfill the related issue.

A new platform has been added in order to allow for building
a NodeJS package. From the root of the project:

    ./tools/make-nodejs

This will create new uBlock0.nodejs directory in the
./dist/build directory, which is a valid NodeJS package.

From the root of the package, you can try:

    node test

This will instantiate a static network filtering engine,
populated by easylist and easyprivacy, which can be used
to match network requests by filling the appropriate
filtering context object.

The test.js file contains code which is typical example
of usage of the package.

Limitations: the NodeJS package can't execute the WASM
versions of the code since the WASM module requires the
use of fetch(), which is not available in NodeJS.

This is a first pass at modularizing the codebase, and
while at it a number of opportunistic small rewrites
have also been made.

This commit requires the minimum supported version for
Chromium and Firefox be raised to 61 and 60 respectively.
2021-07-27 17:26:04 -04:00
Raymond Hill
193cbac43e
Make Firefox dev build auto-update 2021-07-26 08:40:46 -04:00
Raymond Hill
3ba1fe05eb
New revision for dev build 2021-07-26 08:36:00 -04:00
Raymond Hill
f392d09a13
Fix broken the compiling of generic cosmetic exception filters
Related issue:
- https://github.com/uBlockOrigin/uAssets/pull/9637

Regression from
- https://github.com/gorhill/uBlock/commit/c25938f
2021-07-26 08:34:32 -04:00
Raymond Hill
89064478dd
Modernize code: URLSearchParams() API support is now widespread 2021-07-25 07:08:03 -04:00
Raymond Hill
bf7b0702e4
Make Firefox dev build auto-update 2021-07-24 07:56:34 -04:00
Raymond Hill
8d270cf6e6
New revision for dev build 2021-07-24 07:48:20 -04:00
Raymond Hill
c25938f5bc
Ensure compiled sections are ordered in ascending id
Related issue:
- https://www.reddit.com/r/uBlockOrigin/comments/oq6kt5/ubo_loads_generic_filter_instead_of_specific/h6a4nca/
2021-07-24 07:44:26 -04:00
Raymond Hill
2035475371
Make Firefox dev build auto-update 2021-07-23 10:35:48 -04:00