diff --git a/src/scriptlets/prevent-fetch.js b/src/scriptlets/prevent-fetch.js index 6ef2d8a5..a62caadc 100644 --- a/src/scriptlets/prevent-fetch.js +++ b/src/scriptlets/prevent-fetch.js @@ -44,31 +44,34 @@ import { * which is useful for debugging but permitted for production filter lists. * * **Examples** - * 1. Prevent all fetch calls + * 1. Log all fetch calls * ``` * example.org#%#//scriptlet('prevent-fetch') - * OR + * ``` + * + * 2. Prevent all fetch calls + * ``` * example.org#%#//scriptlet('prevent-fetch', '*') * OR * example.org#%#//scriptlet('prevent-fetch', '') * ``` * - * 2. Prevent fetch call for specific url + * 3. Prevent fetch call for specific url * ``` * example.org#%#//scriptlet('prevent-fetch', '/url\\.part/') * ``` * - * 3. Prevent fetch call for specific request method + * 4. Prevent fetch call for specific request method * ``` * example.org#%#//scriptlet('prevent-fetch', 'method:HEAD') * ``` * - * 4. Prevent fetch call for specific url and request method + * 5. Prevent fetch call for specific url and request method * ``` * example.org#%#//scriptlet('prevent-fetch', '/specified_url_part/ method:/HEAD|GET/') * ``` * - * 5. Prevent fetch call and specify response body value + * 6. Prevent fetch call and specify response body value * ``` * ! Specify response body for fetch call to a specific url * example.org#%#//scriptlet('prevent-fetch', '/specified_url_part/ method:/HEAD|GET/', 'emptyArr') diff --git a/wiki/about-scriptlets.md b/wiki/about-scriptlets.md index ada363c2..fbe00694 100644 --- a/wiki/about-scriptlets.md +++ b/wiki/about-scriptlets.md @@ -759,31 +759,34 @@ example.org#%#//scriptlet('prevent-fetch'[, propsToMatch[, responseBody]]) which is useful for debugging but permitted for production filter lists. **Examples** -1. Prevent all fetch calls +1. Log all fetch calls ``` example.org#%#//scriptlet('prevent-fetch') - OR + ``` + +2. Prevent all fetch calls + ``` example.org#%#//scriptlet('prevent-fetch', '*') OR example.org#%#//scriptlet('prevent-fetch', '') ``` -2. Prevent fetch call for specific url +3. Prevent fetch call for specific url ``` example.org#%#//scriptlet('prevent-fetch', '/url\\.part/') ``` -3. Prevent fetch call for specific request method +4. Prevent fetch call for specific request method ``` example.org#%#//scriptlet('prevent-fetch', 'method:HEAD') ``` -4. Prevent fetch call for specific url and request method +5. Prevent fetch call for specific url and request method ``` example.org#%#//scriptlet('prevent-fetch', '/specified_url_part/ method:/HEAD|GET/') ``` -5. Prevent fetch call and specify response body value +6. Prevent fetch call and specify response body value ``` ! Specify response body for fetch call to a specific url example.org#%#//scriptlet('prevent-fetch', '/specified_url_part/ method:/HEAD|GET/', 'emptyArr')