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. This lets extensions modify network requests without intercepting them and viewing their content, thus providing more privacy.

The chrome.declarativeNetRequest API is used to block or modify
network requests by specifying declarative rules. This lets extensions
modify network requests without intercepting them and viewing their content,
thus providing more privacy.

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

api-tableclj

source

dynamic-ruleset-id*cljs

(dynamic-ruleset-id* config)
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-dynamic-ruleset-idclj/smacro

(get-dynamic-ruleset-id)
Ruleset ID for the dynamic rules added by the extension.

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

get-enabled-rulesetsclj/smacro

(get-enabled-rulesets)

Returns the ids for the current set of enabled static rulesets.

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

|ruleset-ids| - https://developer.chrome.com/extensions/declarativeNetRequest#property-callback-rulesetIds.

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

Returns the ids for the current set of enabled static rulesets.

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

  |ruleset-ids| - https://developer.chrome.com/extensions/declarativeNetRequest#property-callback-rulesetIds.

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

get-enabled-rulesets*cljs

(get-enabled-rulesets* 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'. Note: getMatchedRules calls associated with a user gesture are exempt from the quota.

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'. Note: getMatchedRules calls associated with a user
gesture are exempt from the quota.

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-regex-rulesclj/smacro

(get-max-number-of-regex-rules)

The maximum number of regular expression rules that an extension can add. This limit is evaluated separately for the set of dynamic rules and those specified in the rule resources file.

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

The maximum number of regular expression rules that an extension can add. This limit is evaluated separately for the set of
dynamic rules and those specified in the rule resources file.

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

get-max-number-of-rulesclj/smacro

(get-max-number-of-rules)

The maximum number of rules that an extension can specify across its enabled static rulesets. 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 across its enabled static rulesets. 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

get-max-number-of-static-rulesetsclj/smacro

(get-max-number-of-static-rulesets)

The maximum number of static Rulesets an extension can specify as part of the 'rule_resources' manifest key.

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

The maximum number of static Rulesets an extension can specify as part of the 'rule_resources' manifest key.

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

getmatchedrules-quota-interval*cljs

(getmatchedrules-quota-interval* config)
source

is-regex-supportedclj/smacro

(is-regex-supported regex-options)

Checks if the given regular expression will be supported as a regexFilter rule condition.

|regex-options| - The regular expression to check.

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

Checks if the given regular expression will be supported as a regexFilter rule condition.

  |regex-options| - The regular expression to check.

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

is-regex-supported*cljs

(is-regex-supported* config regex-options)
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-regex-rules*cljs

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

max-number-of-rules*cljs

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

max-number-of-static-rulesets*cljs

(max-number-of-static-rulesets* config)
source

on-rule-matched-debug*cljs

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

set-extension-action-optionsclj/smacro

(set-extension-action-options options)

Configures how matched actions will be displayed on the extension action. This preference is persisted across sessions.

|options| - https://developer.chrome.com/extensions/declarativeNetRequest#property-setExtensionActionOptions-options.

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

Configures how matched actions will be displayed on the extension action. This preference is persisted across sessions.

  |options| - https://developer.chrome.com/extensions/declarativeNetRequest#property-setExtensionActionOptions-options.

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

set-extension-action-options*cljs

(set-extension-action-options* config options)
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 [info]] where:

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

  |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 options)

Modifies the current set of dynamic rules for the extension. The rules with IDs listed in options.removeRuleIds are first removed, and then the rules given in options.addRules are added. Notes: 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 and across extension updates. Static rules specified as part of the extension package can not be removed using this function. 'MAX_NUMBER_OF_DYNAMIC_RULES' is the maximum number of dynamic rules an extension can add.

|options| - https://developer.chrome.com/extensions/declarativeNetRequest#property-updateDynamicRules-options.

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.

Modifies the current set of dynamic rules for the extension. The rules with IDs listed in options.removeRuleIds are first
removed, and then the rules given in options.addRules are added. Notes:  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 and across extension updates. Static rules specified as part of the extension package can not be removed using
this function. 'MAX_NUMBER_OF_DYNAMIC_RULES' is the maximum number of dynamic rules an extension can add.

  |options| - https://developer.chrome.com/extensions/declarativeNetRequest#property-updateDynamicRules-options.

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 options)
source

update-enabled-rulesetsclj/smacro

(update-enabled-rulesets options)

Updates the set of enabled static rulesets for the extension. The rulesets with IDs listed in options.disableRulesetIds are first removed, and then the rulesets listed in options.enableRulesetIds are added. Note that the set of enabled static rulesets is persisted across sessions but not across extension updates, i.e. the rule_resources manifest key will determine the set of enabled static rulesets on each extension update.

|options| - https://developer.chrome.com/extensions/declarativeNetRequest#property-updateEnabledRulesets-options.

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

Updates the set of enabled static rulesets for the extension. The rulesets with IDs listed in options.disableRulesetIds are
first removed, and then the rulesets listed in options.enableRulesetIds are added. Note that the set of enabled static
rulesets is persisted across sessions but not across extension updates, i.e. the rule_resources manifest key will determine
the set of enabled static rulesets on each extension update.

  |options| - https://developer.chrome.com/extensions/declarativeNetRequest#property-updateEnabledRulesets-options.

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

update-enabled-rulesets*cljs

(update-enabled-rulesets* config options)
source

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

× close