1
0
mirror of https://github.com/gorhill/uBlock.git synced 2024-11-07 11:22:38 +01:00
uBlock/src/js
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
..
codemirror Modularize codebase with export/import 2021-07-27 17:26:04 -04:00
scriptlets Fix broken "Block element..." case when cosmetic filtering is off 2021-07-12 18:32:32 -04:00
wasm Fix edge case involving filter with a single wildcard 2020-06-27 07:58:46 -04:00
1p-filters.js Modularize codebase with export/import 2021-07-27 17:26:04 -04:00
3p-filters.js Prevent unchecked default lists from being visually collapsed 2021-05-19 09:34:46 -04:00
about.js Drop the v from build version 2021-06-25 07:18:11 -04:00
advanced-settings.js Add support for admin-managed hidden settings 2021-01-05 12:16:50 -05:00
asset-viewer.js Modularize codebase with export/import 2021-07-27 17:26:04 -04:00
assets.js Modularize codebase with export/import 2021-07-27 17:26:04 -04:00
background.js Modularize codebase with export/import 2021-07-27 17:26:04 -04:00
base64-custom.js Modularize codebase with export/import 2021-07-27 17:26:04 -04:00
biditrie.js Modularize codebase with export/import 2021-07-27 17:26:04 -04:00
cachestorage.js Modularize codebase with export/import 2021-07-27 17:26:04 -04:00
click2load.js Fix handling of cname-aliased URLs in click-to-load widget 2021-01-22 09:37:12 -05:00
cloud-ui.js Add support for removal of cloud storage entries 2020-08-21 09:18:33 -04:00
commands.js Modularize codebase with export/import 2021-07-27 17:26:04 -04:00
console.js Force console output when explicitly requested from dev tools 2020-02-25 11:00:58 -05:00
contentscript-extra.js Fix handling of some procedural cosmetic filters with explicit :scope 2021-07-23 10:11:07 -04:00
contentscript.js Disable creation of cosmetic filters in picker when unenforceable 2021-07-12 11:55:58 -04:00
contextmenu.js Modularize codebase with export/import 2021-07-27 17:26:04 -04:00
cosmetic-filtering.js Modularize codebase with export/import 2021-07-27 17:26:04 -04:00
dashboard-common.js Add CoreMirror's code-folding ability to list editor/viewer 2020-07-10 08:01:39 -04:00
dashboard.js Use location.replace() to modify URL of embedded frame 2021-07-10 09:56:36 -04:00
document-blocked.js Modernize code: URLSearchParams() API support is now widespread 2021-07-25 07:08:03 -04:00
dyna-rules.js Modularize codebase with export/import 2021-07-27 17:26:04 -04:00
dynamic-net-filtering.js Modularize codebase with export/import 2021-07-27 17:26:04 -04:00
epicker-ui.js Modularize codebase with export/import 2021-07-27 17:26:04 -04:00
fa-icons.js Fix missing magnifier in document-blocked page 2020-12-07 14:32:59 -05:00
filtering-context.js Modularize codebase with export/import 2021-07-27 17:26:04 -04:00
globals.js Modularize codebase with export/import 2021-07-27 17:26:04 -04:00
hnswitches.js Modularize codebase with export/import 2021-07-27 17:26:04 -04:00
hntrie.js Modularize codebase with export/import 2021-07-27 17:26:04 -04:00
html-filtering.js Modularize codebase with export/import 2021-07-27 17:26:04 -04:00
httpheader-filtering.js Modularize codebase with export/import 2021-07-27 17:26:04 -04:00
i18n.js Fix layout issue with cloud storage widget 2020-08-21 08:57:47 -04:00
logger-ui-inspector.js Modularize codebase with export/import 2021-07-27 17:26:04 -04:00
logger-ui.js Modularize codebase with export/import 2021-07-27 17:26:04 -04:00
logger.js Modularize codebase with export/import 2021-07-27 17:26:04 -04:00
lz4.js Modularize codebase with export/import 2021-07-27 17:26:04 -04:00
messaging.js Modularize codebase with export/import 2021-07-27 17:26:04 -04:00
pagestore.js Modularize codebase with export/import 2021-07-27 17:26:04 -04:00
popup-fenix.js Fix rendering of punycoded hostname in popup panel 2021-07-20 11:22:33 -04:00
popup.js Fix improper hashing of rules in classic popup panel 2021-05-09 11:41:23 -04:00
redirect-engine.js Modularize codebase with export/import 2021-07-27 17:26:04 -04:00
reverselookup.js Modularize codebase with export/import 2021-07-27 17:26:04 -04:00
scriptlet-filtering.js Modularize codebase with export/import 2021-07-27 17:26:04 -04:00
settings.js Expose ability to toggle on/off cname-uncloaking to all users 2021-03-02 13:00:56 -05:00
shortcuts.js Support keyboard shortcut to open popup panel 2019-11-09 09:53:31 -05:00
start.js Modularize codebase with export/import 2021-07-27 17:26:04 -04:00
static-ext-filtering.js Modularize codebase with export/import 2021-07-27 17:26:04 -04:00
static-filtering-io.js Modularize codebase with export/import 2021-07-27 17:26:04 -04:00
static-filtering-parser.js Modularize codebase with export/import 2021-07-27 17:26:04 -04:00
static-net-filtering.js Modularize codebase with export/import 2021-07-27 17:26:04 -04:00
storage.js Modularize codebase with export/import 2021-07-27 17:26:04 -04:00
tab.js Modularize codebase with export/import 2021-07-27 17:26:04 -04:00
text-encode.js Modularize codebase with export/import 2021-07-27 17:26:04 -04:00
text-iterators.js Modularize codebase with export/import 2021-07-27 17:26:04 -04:00
traffic.js Modularize codebase with export/import 2021-07-27 17:26:04 -04:00
ublock.js Modularize codebase with export/import 2021-07-27 17:26:04 -04:00
udom.js Disable auto activation of dark theme in next release 2020-11-13 12:15:29 -05:00
uri-utils.js Modularize codebase with export/import 2021-07-27 17:26:04 -04:00
url-net-filtering.js Modularize codebase with export/import 2021-07-27 17:26:04 -04:00
utils.js Modularize codebase with export/import 2021-07-27 17:26:04 -04:00
whitelist.js Add "extraTrustedSiteDirectives" as new admin policy 2021-01-04 07:54:24 -05:00