Traffic Blocker persists all of its runtime state inDocumentation 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.storage.local. There are exactly two top-level keys: settings, which tracks the blocked-request counter and the user’s dark mode preference, and blocker, which holds the full rule list and the on/off toggle state. Neither the popup nor the background worker uses any other storage area.
settings Key
The settings object is written by both the background service worker (incrementing blocked) and the App.vue root component (setting darkMode).
Total number of network requests that have been blocked since the extension was installed or statistics were last reset. Incremented by the background service worker each time
chrome.webRequest.onErrorOccurred fires with net::ERR_BLOCKED_BY_CLIENT.Dark mode preference. When
true, App.vue adds the dark-mode CSS class to document.body. Persisted so the preference survives popup close and browser restarts.blocker Key
The blocker object is written exclusively by the background service worker after a successful declarativeNetRequest.updateDynamicRules call. The popup reads it on mount to restore the last known state.
The complete list of
declarativeNetRequest rules currently managed by the extension. Rules are stored even when isEnabled is false so they can be re-applied without the user re-entering them.Whether blocking is currently active. When
false, the rules array is kept in storage but an empty array is passed to declarativeNetRequest.updateDynamicRules, so no requests are actually blocked.Rule Object
Each element ofblocker.rules conforms to the declarativeNetRequest rule shape. The background worker runs every rule through autoFixRule() before storage, so missing fields are filled with safe defaults.
Unique numeric identifier for the rule. IDs are assigned sequentially starting from
1 every time the rule list is updated — they are not stable across updates.Rule matching priority. Defaults to
1 when not supplied. Higher values take precedence when multiple rules could match the same request.The action to perform when the rule matches. Traffic Blocker always uses
{ type: 'block' }.Matching condition object. At minimum,
urlFilter must be present.URL pattern to match against the request URL. Supports wildcards, for example
*://*.example.com/*.When set, the rule only blocks requests that originate from one of the listed domains. Useful for domain-scoped blocking without affecting the same resource on other sites.
When set, requests originating from these domains are not blocked even if the URL matches. This field is optional and carries no automatic defaults — it is passed through from the rule as supplied by the user.
Initialization on Install
Whenchrome.runtime.onInstalled fires, the background worker reads both keys. If either is absent it writes the corresponding default:
| Key | Default value written |
|---|---|
settings | { blocked: 0 } |
blocker | { rules: [], isEnabled: false } |
IDs are reassigned sequentially (starting from 1) every time rules are updated. Do not rely on stored IDs being stable.