From 4686899b58ee843b82b446834803a22f0baf6da4 Mon Sep 17 00:00:00 2001 From: gwarser Date: Fri, 24 Apr 2020 08:33:35 +0200 Subject: [PATCH] Rearange `script:inject` -> `+js` --- Static-filter-syntax.md | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/Static-filter-syntax.md b/Static-filter-syntax.md index 17259d9..6c1f22d 100644 --- a/Static-filter-syntax.md +++ b/Static-filter-syntax.md @@ -489,12 +489,10 @@ Support for chaining procedural operators with native CSS selector syntax (i.e. ### Scriptlet injection - script:inject(...) - -Starting from [1.15.12](https://github.com/gorhill/uBlock/commit/ec56165d0d36ab91fba7d5cf44a4552d19fefdd5) uBO supports new shorter syntax: - +js(...) +`script:inject(...)` up to [1.15.12](https://github.com/gorhill/uBlock/commit/ec56165d0d36ab91fba7d5cf44a4552d19fefdd5). + This allows the injection of specific javascript code into pages. The `...` part is a token identifying a javascript resource from the [resource library](./Resources-Library). Keep in mind the resource library is completely under control of the uBO project, hence only javascript code vouched by uBO can be inserted into web pages, through the use of a valid resource token. Some scriptlets support additional parameters, which can be specified after scriptlet name, separated by comma. Commas in parameters must be escaped. Before [1.21.7b8](https://github.com/gorhill/uBlock/commit/d67340f14db6ce5b446ef0ff4586b5e4d31f1086#diff-b03ba512faa0934947e57d28dc99b43bL242) this was possible only in regex literals (`/foo\x2Cbar\u002Cbaz/`), now backslash character is sufficient (`foo\,bar`).