uBlock/src/js
Raymond Hill 18a84d2819
Refactor scriptlets injection code
Builtin scriptlets are no longer parsed as text-based resources,
they are imported as JS functions, and `toString()` is used to
obtain text-based representation of a scriptlet.

Scriptlet parameters are now passed as function call arguments
rather than by replacing text-based occurrences of `{{i}}`. The
arguments are always string values (see below for exception).

Support for argument as Object has been added. This opens the
door to have scriptlets using named arguments rather than
positional arguments, and hence easier to extend functionality
of existing scriptlets. Example:

    example.com##+js(scriplet, { "prop": "adblock", "value": false, "log": true })

Compatibility with user-provided scriptlets has been preserved.

User-provided scriptlets can benefit some of the changes:

Use the form `function(..){..}` instead of `(function(..){..})();`
in order to received scriptlet arguments as part of function call
-- instead of using `{{i}}`.

If using the form `function(..){..}`, you can choose to receive
an Object as argument -- just be sure that your scriptlet's
parameter is valid JSON notation.
2023-03-24 14:05:18 -04:00
..
codemirror Fix search widget when swapping document in new code viewer 2023-03-16 12:36:02 -04:00
scriptlets Minor code review 2023-01-07 12:52:46 -05:00
wasm use WebAssembly-1.0 compliant function names 2022-05-22 17:34:12 +02:00
1p-filters.js Code maintenance: replace uDom.js with dom.js 2022-11-12 09:51:22 -05:00
3p-filters.js Trim content of Import field 2022-11-23 12:55:20 -05:00
about.js Code maintenance: replace uDom.js with dom.js 2022-11-12 09:51:22 -05:00
advanced-settings.js Code maintenance: replace uDom.js with dom.js 2022-11-12 09:51:22 -05:00
asset-viewer.js Code maintenance: replace uDom.js with dom.js 2022-11-12 09:51:22 -05:00
assets.js Properly handle default list status changes in assets.json 2023-03-23 13:40:51 -04:00
background.js Properly handle default list status changes in assets.json 2023-03-23 13:40:51 -04:00
base64-custom.js Modularize codebase with export/import 2021-07-27 17:26:04 -04:00
benchmarks.js Make loadBenchmarkDataset() compatible with more recent requests.json 2021-12-18 11:44:01 -05:00
biditrie.js Add experimental mv3 version 2022-09-06 13:47:52 -04:00
cachestorage.js Fix typos in README, docs, and JS comments 2022-03-13 08:56:26 -04:00
click2load.js Fix CSS sizing of click-to-load widget as suggested 2022-01-07 08:02:31 -05:00
cloud-ui.js Code maintenance: replace uDom.js with dom.js 2022-11-12 09:51:22 -05:00
code-viewer.js Minor fine tuning 2023-03-16 14:54:45 -04:00
commands.js Code maintenance: replace uDom.js with dom.js 2022-11-12 09:51:22 -05:00
console.js Further modularize uBO's codebase 2021-07-28 19:48:38 -04:00
contentscript-extra.js Fix missing regex flags 2023-01-01 21:58:14 -05:00
contentscript.js Set charset to utf-8 for Blob-based injected scriptlets 2023-01-01 09:33:20 -05:00
contextmenu.js Fix "View source..." context menu entry in Firefox 2023-03-12 10:21:30 -04:00
cosmetic-filtering.js Output highly generic cosmetic filters 2023-02-13 12:43:58 -05:00
dashboard-common.js Code maintenance: replace uDom.js with dom.js 2022-11-12 09:51:22 -05:00
dashboard.js Prevent dashboard from loading at browser launch until ready 2023-03-16 09:17:36 -04:00
devtools.js Code maintenance: replace uDom.js with dom.js 2022-11-12 09:51:22 -05:00
document-blocked.js Use placeholders to minimize vertical shifting at page load time 2022-11-15 09:44:19 -05:00
dom.js Fix dom.text() returning textContent 2022-11-12 10:35:40 -05:00
dyna-rules.js Code maintenance: replace uDom.js with dom.js 2022-11-12 09:51:22 -05:00
dynamic-net-filtering.js Properly "bleed" 3p rules onto 3p-script/3p-frame cells 2022-07-15 12:00:43 -04:00
epicker-ui.js Rewrite static filtering parser 2023-01-23 16:53:18 -05:00
fa-icons.js [mv3] Add support for specific cosmetic filtering 2022-09-15 13:14:08 -04:00
filtering-context.js Add option to filter by HTTP method in static network filters 2022-12-22 13:15:08 -05:00
filtering-engines.js Export the rule-based filtering engines to the nodejs package 2021-08-03 12:19:25 -04:00
hnswitches.js Convert punycode.js into an ES module (#3845) 2021-08-22 12:03:59 -04:00
hntrie.js Fix not properly resetting needle buffer in createTrieFromStoredDomainOpt() 2021-12-25 07:51:12 -05:00
html-filtering.js Add support for regex-based values as target domain for static extended filters 2023-01-31 14:15:13 -05:00
httpheader-filtering.js Fix broken http header filtering 2023-03-21 10:22:32 -04:00
i18n.js [mv3] Add ability to enable/disable filter lists 2022-09-13 17:44:24 -04:00
logger-ui-inspector.js Fix typo in string template code 2022-11-20 10:17:05 -05:00
logger-ui.js Cleanup unused code 2023-03-12 10:08:20 -04:00
logger.js Rewrite logger's "exceptor" feature 2022-12-14 16:04:45 -05:00
lz4.js Further modularize uBO's codebase 2021-07-28 19:48:38 -04:00
messaging.js Fix report of unprocessed requests in Support pane 2023-03-18 16:20:40 -04:00
pagestore.js Fix potentially reporting wrong context in logger for ghide filters 2021-12-17 09:47:14 -05:00
popup-fenix.js Fix report of unprocessed requests in Support pane 2023-03-18 16:20:40 -04:00
redirect-engine.js Refactor scriptlets injection code 2023-03-24 14:05:18 -04:00
redirect-resources.js Rewrite static filtering parser 2023-01-23 16:53:18 -05:00
reverselookup-worker.js Add support for regex-based values as target domain for static extended filters 2023-01-31 14:15:13 -05:00
reverselookup.js Minor code review 2023-01-30 11:14:07 -05:00
scriptlet-filtering.js Refactor scriptlets injection code 2023-03-24 14:05:18 -04:00
settings.js Code maintenance: replace uDom.js with dom.js 2022-11-12 09:51:22 -05:00
start.js Add dev console boot sequence info 2023-03-18 14:37:49 -04:00
static-dnr-filtering.js Do not generate DNR block rule for redirect= filters 2023-03-06 13:06:57 -05:00
static-ext-filtering-db.js Minor code review 2023-02-01 10:22:13 -05:00
static-ext-filtering.js Rewrite static filtering parser 2023-01-23 16:53:18 -05:00
static-filtering-io.js Change compiled list format to a saner block id management 2021-12-07 11:15:14 -05:00
static-filtering-parser.js Refactor scriptlets injection code 2023-03-24 14:05:18 -04:00
static-net-filtering.js Do not generate DNR block rule for redirect= filters 2023-03-06 13:06:57 -05:00
storage.js Properly handle default list status changes in assets.json 2023-03-23 13:40:51 -04:00
support.js Code maintenance: replace uDom.js with dom.js 2022-11-12 09:51:22 -05:00
tab.js Context of about:blank is that of parent frame (popup option) 2023-03-10 08:48:48 -05:00
tasks.js Refactoring work in static network filtering engine 2021-12-04 11:16:44 -05:00
text-encode.js Further modularize uBO's codebase 2021-07-28 19:48:38 -04:00
text-utils.js Move orphanizeString() into text-utils module 2021-07-31 08:38:33 -04:00
theme.js Fix race condition when looking up current auto/light/dark theme 2023-03-12 11:20:54 -04:00
traffic.js Fix report of unprocessed requests in Support pane 2023-03-18 16:20:40 -04:00
ublock.js Make popup panel reflect state of the actual blocked page 2022-09-10 11:55:19 -04:00
uri-utils.js Simplify often-executed regex 2021-12-10 07:47:21 -05:00
url-net-filtering.js Fix improperly detecting ruleset changes re. dynamic URL filtering 2022-10-19 12:12:09 -04:00
utils.js Minor code review 2023-01-07 12:55:57 -05:00
whitelist.js Fix wrong syntax color highlight in "Trusted sites" pane 2023-03-02 20:50:32 -05:00