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 80
  * https://developer.chrome.com/extensions/declarativeNetRequest
raw docstring

api-tableclj

source

gen-callclj

source

gen-wrapclj/smacro

(gen-wrap kind item-id config & args)
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-getmatchedrules-quota-intervalclj/smacro

(get-getmatchedrules-quota-interval)

Time interval within which MAX_GETMATCHEDRULES_CALLS_PER_INTERVAL getMatchedRules calls can be made, specified in minutes. Additional calls will fail immediately and set 'runtime.lastError'.

https://developer.chrome.com/extensions/declarativeNetRequest#property-GETMATCHEDRULES_QUOTA_INTERVAL.

Time interval within which MAX_GETMATCHEDRULES_CALLS_PER_INTERVAL getMatchedRules calls can be made, specified in minutes.
Additional calls will fail immediately and set 'runtime.lastError'.

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

get-matched-rulesclj/smacro

(get-matched-rules)
(get-matched-rules filter)

Returns all rules matched for the extension. Callers can optionally filter the list of matched rules by specifying a |filter|. This method is only available to extensions with the declarativeNetRequestFeedback permission or having the activeTab permission granted for the tabId specified in filter. Note: Rules not associated with an active document that were matched more than five minutes ago will not be returned.

|filter| - An object to filter the list of matched rules.

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

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

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

Returns all rules matched for the extension. Callers can optionally filter the list of matched rules by specifying a
|filter|. This method is only available to extensions with the declarativeNetRequestFeedback permission or having the
activeTab permission granted for the tabId specified in filter. Note: Rules not associated with an active document that
were matched more than five minutes ago will not be returned.

  |filter| - An object to filter the list of matched rules.

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

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

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

get-matched-rules*cljs

(get-matched-rules* config filter)
source

get-max-getmatchedrules-calls-per-intervalclj/smacro

(get-max-getmatchedrules-calls-per-interval)

The number of times getMatchedRules can be called within a period of GETMATCHEDRULES_QUOTA_INTERVAL.

https://developer.chrome.com/extensions/declarativeNetRequest#property-MAX_GETMATCHEDRULES_CALLS_PER_INTERVAL.

The number of times getMatchedRules can be called within a period of GETMATCHEDRULES_QUOTA_INTERVAL.

https://developer.chrome.com/extensions/declarativeNetRequest#property-MAX_GETMATCHEDRULES_CALLS_PER_INTERVAL.
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

getmatchedrules-quota-interval*cljs

(getmatchedrules-quota-interval* config)
source

max-getmatchedrules-calls-per-interval*cljs

(max-getmatchedrules-calls-per-interval* 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

set-action-count-as-badge-textclj/smacro

(set-action-count-as-badge-text enable)

Sets whether to automatically badge extension's icon to the matched action count for a tab. This preference is persisted across sessions and is false by default.

|enable| - https://developer.chrome.com/extensions/declarativeNetRequest#property-setActionCountAsBadgeText-enable.

https://developer.chrome.com/extensions/declarativeNetRequest#method-setActionCountAsBadgeText.

Sets whether to automatically badge extension's icon to the matched action count for a tab. This preference is persisted
across sessions and is false by default.

  |enable| - https://developer.chrome.com/extensions/declarativeNetRequest#property-setActionCountAsBadgeText-enable.

https://developer.chrome.com/extensions/declarativeNetRequest#method-setActionCountAsBadgeText.
sourceraw docstring

set-action-count-as-badge-text*cljs

(set-action-count-as-badge-text* config enable)
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 with the declarativeNetRequestFeedback permission 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 with the declarativeNetRequestFeedback
permission 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