Liking cljdoc? Tell your friends :D

chromex.ext.declarative-net-request

clj

The chrome.declarativeNetRequest API is used to block or modify network requests by specifying declarative rules.

The chrome.declarativeNetRequest API is used to block or modify
network requests by specifying declarative rules.

  * available since Chrome 79
  * https://developer.chrome.com/extensions/declarativeNetRequest
raw docstring

add-allowed-pagesclj/smacro

(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.
sourceraw docstring

add-allowed-pages*cljs

(add-allowed-pages* config page-patterns)
source

api-tableclj

source

gen-callclj

source

gen-wrapclj/smacro

(gen-wrap kind item-id config & args)
source

get-allowed-pagesclj/smacro

(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.
sourceraw docstring

get-allowed-pages*cljs

(get-allowed-pages* config)
source

get-dynamic-rulesclj/smacro

(get-dynamic-rules)

Returns the current set of dynamic rules for the extension.

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 [rules] where:

|rules| - https://developer.chrome.com/extensions/declarativeNetRequest#property-callback-rules.

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-getDynamicRules.

Returns the current set of dynamic rules for the extension.

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 [rules] where:

  |rules| - https://developer.chrome.com/extensions/declarativeNetRequest#property-callback-rules.

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-getDynamicRules.
sourceraw docstring

get-dynamic-rules*cljs

(get-dynamic-rules* config)
source

get-max-number-of-allowed-pagesclj/smacro

(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.
sourceraw docstring

get-max-number-of-dynamic-rulesclj/smacro

(get-max-number-of-dynamic-rules)
The maximum number of dynamic rules that an extension can add.

https://developer.chrome.com/extensions/declarativeNetRequest#property-MAX_NUMBER_OF_DYNAMIC_RULES.
sourceraw docstring

get-max-number-of-rulesclj/smacro

(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.
sourceraw docstring

max-number-of-allowed-pages*cljs

(max-number-of-allowed-pages* config)
source

max-number-of-dynamic-rules*cljs

(max-number-of-dynamic-rules* config)
source

max-number-of-rules*cljs

(max-number-of-rules* config)
source

on-rule-matched-debug*cljs

(on-rule-matched-debug* config channel & args)
source

remove-allowed-pagesclj/smacro

(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 be 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 be 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.
sourceraw docstring

remove-allowed-pages*cljs

(remove-allowed-pages* config page-patterns)
source

tap-all-eventsclj/smacro

(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.
sourceraw docstring

tap-on-rule-matched-debug-eventsclj/smacro

(tap-on-rule-matched-debug-events channel & args)

Fired when a rule is matched with a request. Only available for unpacked extensions as this is intended to be used for debugging purposes only.

Events will be put on the |channel| with signature [::on-rule-matched-debug [matched-rule-info]] where:

|matched-rule-info| - The rule that has been matched along with information about the associated request.

Note: |args| will be passed as additional parameters into Chrome event's .addListener call.

https://developer.chrome.com/extensions/declarativeNetRequest#event-onRuleMatchedDebug.

Fired when a rule is matched with a request. Only available for unpacked extensions as this is intended to be used for
debugging purposes only.

Events will be put on the |channel| with signature [::on-rule-matched-debug [matched-rule-info]] where:

  |matched-rule-info| - The rule that has been matched along with information about the associated request.

Note: |args| will be passed as additional parameters into Chrome event's .addListener call.

https://developer.chrome.com/extensions/declarativeNetRequest#event-onRuleMatchedDebug.
sourceraw docstring

update-dynamic-rulesclj/smacro

(update-dynamic-rules rule-ids-to-remove rules-to-add)

Modify the current set of dynamic rules for the extension. The rules with IDs listed in rule_ids_to_remove are first removed, and then the rules given in rules_to_add are added. This update happens as a single atomic operation: either all specified rules are added and removed, or an error is returned. These rules are persisted across browser sessions. Any ids in rule_ids_to_remove that are not present will be ignored. Note that static rules specified as part of the extension package can not be removed using this function. Note: MAX_NUMBER_OF_DYNAMIC_RULES is the maximum number of dynamic rules an extension can add.

|rule-ids-to-remove| - The IDs of rules to remove. |rules-to-add| - The rules to add.

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-updateDynamicRules.

Modify the current set of dynamic rules for the extension. The rules with IDs listed in rule_ids_to_remove are first
removed, and then the rules given in rules_to_add are added. This update happens as a single atomic operation: either all
specified rules are added and removed, or an error is returned. These rules are persisted across browser sessions. Any ids
in rule_ids_to_remove that are not present will be ignored. Note that static rules specified as part of the extension
package can not be removed using this function. Note:  MAX_NUMBER_OF_DYNAMIC_RULES is the maximum number of dynamic rules
an extension can add.

  |rule-ids-to-remove| - The IDs of rules to remove.
  |rules-to-add| - The rules to add.

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-updateDynamicRules.
sourceraw docstring

update-dynamic-rules*cljs

(update-dynamic-rules* config rule-ids-to-remove rules-to-add)
source

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close