The chrome.declarativeNetRequest API is used to block or redirect network requests by specifying declarative rules.
The chrome.declarativeNetRequest API is used to block or redirect network requests by specifying declarative rules. * available since Chrome 72 * https://developer.chrome.com/extensions/declarativeNetRequest
(add-allowed-pages page-patterns)
Adds page_patterns to the set of allowed pages. Requests from these pages are not intercepted by the extension. These are persisted across browser sessions. Note: MAX_NUMBER_OF_ALLOWED_PAGES is the maximum number of allowed page an extension can add. Also, adding page patterns is atomic. In case of an error, no page pattern is added.
|page-patterns| - Array of match patterns which are to be allowed.
This function returns a core.async channel of type promise-chan
which eventually receives a result value.
Signature of the result value put on the channel is [].
In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error.
https://developer.chrome.com/extensions/declarativeNetRequest#method-addAllowedPages.
Adds page_patterns to the set of allowed pages. Requests from these pages are not intercepted by the extension. These are persisted across browser sessions. Note: MAX_NUMBER_OF_ALLOWED_PAGES is the maximum number of allowed page an extension can add. Also, adding page patterns is atomic. In case of an error, no page pattern is added. |page-patterns| - Array of match patterns which are to be allowed. This function returns a core.async channel of type `promise-chan` which eventually receives a result value. Signature of the result value put on the channel is []. In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error. https://developer.chrome.com/extensions/declarativeNetRequest#method-addAllowedPages.
(get-allowed-pages)
Returns the current set of allowed pages.
This function returns a core.async channel of type promise-chan
which eventually receives a result value.
Signature of the result value put on the channel is [result] where:
|result| - https://developer.chrome.com/extensions/declarativeNetRequest#property-callback-result.
In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error.
https://developer.chrome.com/extensions/declarativeNetRequest#method-getAllowedPages.
Returns the current set of allowed pages. This function returns a core.async channel of type `promise-chan` which eventually receives a result value. Signature of the result value put on the channel is [result] where: |result| - https://developer.chrome.com/extensions/declarativeNetRequest#property-callback-result. In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error. https://developer.chrome.com/extensions/declarativeNetRequest#method-getAllowedPages.
(get-max-number-of-allowed-pages)
The maximum number of allowed pages that an extension can add.
https://developer.chrome.com/extensions/declarativeNetRequest#property-MAX_NUMBER_OF_ALLOWED_PAGES.
The maximum number of allowed pages that an extension can add. https://developer.chrome.com/extensions/declarativeNetRequest#property-MAX_NUMBER_OF_ALLOWED_PAGES.
(get-max-number-of-rules)
The maximum number of rules that an extension can specify in the rule resources file. Any excess rules will be ignored and an install warning will be raised.
https://developer.chrome.com/extensions/declarativeNetRequest#property-MAX_NUMBER_OF_RULES.
The maximum number of rules that an extension can specify in the rule resources file. Any excess rules will be ignored and an install warning will be raised. https://developer.chrome.com/extensions/declarativeNetRequest#property-MAX_NUMBER_OF_RULES.
(remove-allowed-pages page-patterns)
Removes page_patterns from the set of allowed pages. Note: Removing page patterns is atomic. In case of an error, no page pattern is removed.
|page-patterns| - Array of match patterns which are to removed.
This function returns a core.async channel of type promise-chan
which eventually receives a result value.
Signature of the result value put on the channel is [].
In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error.
https://developer.chrome.com/extensions/declarativeNetRequest#method-removeAllowedPages.
Removes page_patterns from the set of allowed pages. Note: Removing page patterns is atomic. In case of an error, no page pattern is removed. |page-patterns| - Array of match patterns which are to removed. This function returns a core.async channel of type `promise-chan` which eventually receives a result value. Signature of the result value put on the channel is []. In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error. https://developer.chrome.com/extensions/declarativeNetRequest#method-removeAllowedPages.
(tap-all-events chan)
Taps all valid non-deprecated events in chromex.ext.declarative-net-request namespace.
Taps all valid non-deprecated events in chromex.ext.declarative-net-request namespace.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close