xBlockOrigin uses Chrome’s storage APIs for data persistence, with separation between synced and local storage.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/chefnaphtha/xBlockOrigin/llms.txt
Use this file to discover all available pages before exploring further.
Storage types
The extension uses two Chrome storage areas:- chrome.storage.sync
- chrome.storage.local
Synced across devices - Limited to 100KB total, 8KB per item
- Country blacklist
- User whitelist
- Extension settings
All storage operations use Valibot schemas for runtime validation to ensure type safety and data integrity.
Synced storage (chrome.storage.sync)
Country blacklist
Storage key:blacklist
Schema:
- Read on every user processing to check if country is blacklisted
- Write when user adds/removes countries via popup UI
User whitelist
Storage key:whitelist
Schema:
- Read on every user processing to check if user is whitelisted
- Write when user adds/removes users from whitelist
Returns all whitelisted users
Checks if a user ID is whitelisted
Adds a user to whitelist (prevents duplicates)
Removes a user from whitelist
Settings
Storage key:settings
Schema:
- Read when processing users (to check
muteFollowing) - Read when injecting flags (to check
showFlags) - Write when user changes settings in popup
Returns current settings (merges with defaults)
Updates settings (partial update supported)
Returns
showFlags setting valueReturns
muteFollowing setting valueLocal storage (chrome.storage.local)
Muted users database
Storage key pattern:muted:{userId}
Schema:
- Write when a new user is muted via API
- Read to display muted users in popup UI
- Read to check if user is already muted (cache miss scenario)
Saves a muted user to database (validates with schema)
Returns all muted users (filters keys with
muted: prefix)Checks if a user ID exists in muted database
Returns all muted users from a specific country
Persistent cache
The cache system stores time-limited data with automatic expiration. See Caching for details. Storage key patterns:cache:country:{username}- Country lookup cache (24h TTL)cache:user:{username}- User ID lookup cache (24h TTL)cache:following:{userId}- Following status cache (5m TTL)
- Read before every API call to check if data is cached
- Write after successful API responses
- Lazy cleanup on read (expired entries deleted when accessed)
Storage limits
| Storage Type | Total Quota | Per-Item Quota |
|---|---|---|
chrome.storage.sync | 100 KB | 8 KB |
chrome.storage.local (Chrome) | 10 MB | N/A |
chrome.storage.local (Firefox) | Unlimited | N/A |
- Blacklist: ~100 bytes per country
- Whitelist: ~100 bytes per user
- Settings: ~50 bytes
- Muted user: ~150 bytes per user
- Cache entry: ~100-200 bytes per entry
With 10MB local storage quota, you can store approximately 50,000-70,000 muted users before hitting the limit.