Each rule that Traffic Blocker stores and registers with the Chrome browser corresponds to aDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/alexperezortuno/ce-blocker/llms.txt
Use this file to discover all available pages before exploring further.
chrome.declarativeNetRequest.Rule object. When rules are saved or imported, the extension validates every entry and automatically fills in any missing fields with safe defaults — so malformed or partial rules are corrected rather than rejected.
Top-level fields
Unique rule identifier. Traffic Blocker automatically reassigns IDs sequentially (1-indexed) on every save operation. Do not rely on ID stability across sessions or imports.
Matching priority for the rule. Defaults to
1. When multiple rules could match the same request, the rule with the highest priority value takes precedence.Defines what to do when the rule matches a request. See the
action object section below.Defines which requests the rule should match. See the
condition object section below.action object
The action to take when the rule matches. Always
"block" in Traffic Blocker. The extension’s UI only exposes the block action type.condition object
The URL pattern to match against incoming requests. Supports wildcards and Chrome’s declarativeNetRequest filter syntax. See URL Patterns for full pattern reference.
Optional list of domains that must have initiated the request for the rule to apply. When set, the rule is scoped — it only blocks the target URL when the request originates from one of these domains. Cannot be combined with
excludedInitiatorDomains on the same rule.Optional list of domains from which requests should never be blocked, even if the URL matches. When a rule is added through the UI without specifying
initiatorDomains, Traffic Blocker automatically adds "localhost" to this list to avoid disrupting local development servers.Complete example
Auto-fix behavior
When rules are imported — whether from a JSON file, a URL, or a preset — the extension runs each entry through an auto-fix function before registering it. This fills in any missing or malformed fields using the following logic frombackground.ts:
priority field accepts both numeric and string values; strings are coerced with parseInt. If no valid urlFilter can be found in condition, the importer falls back to a top-level rule property for backwards compatibility with older export formats.
Traffic Blocker only uses action type
block. The full Chrome declarativeNetRequest spec supports additional action types (allow, redirect, etc.) which are not exposed through the UI.