Site Rules & Auto-Capture
Site Rules
Section titled “Site Rules”Site Rules control which websites Context Bro auto-captures and how it captures them. Each rule defines a group of domains with its own template, endpoints, capture mode, and dedup settings.
Manual sharing (popup, shortcut, context menu) works on any domain regardless of Site Rules.
Creating a Rule
Section titled “Creating a Rule”- Go to Settings → Sites
- Enter a name (e.g. “SNS”, “Dev”, “News”) and click Add
- Add domain patterns, select a template, and choose endpoints
Domain Patterns
Section titled “Domain Patterns”Each rule contains one or more domain patterns (one per line):
| Pattern | Matches |
|---|---|
github.com | Exact domain |
*.github.com | All subdomains (gist.github.com, docs.github.com, etc.) |
news.ycombinator.com | Exact subdomain |
Presets
Section titled “Presets”Click a preset button to quickly create a rule with a curated group of domains:
| Preset | Domains |
|---|---|
| Dev | github.com, stackoverflow.com, developer.mozilla.org, etc. |
| News | reuters.com, bbc.com, cnn.com, nytimes.com, etc. |
| Social | reddit.com, twitter.com, mastodon.social, etc. |
| Streaming | twitch.tv, youtube.com |
Per-Rule Template & Endpoints
Section titled “Per-Rule Template & Endpoints”Each rule can bind to a specific template and one or more endpoints. When auto-capture triggers for that rule, it uses the bound template and sends to the selected endpoints.
Auto-Capture
Section titled “Auto-Capture”Enable the Auto-capture toggle on a rule to have Context Bro automatically extract and send page content. Choose between two capture modes:
When Focused (Focused Mode)
Section titled “When Focused (Focused Mode)”Best for pages you’re actively reading — articles, feeds, dashboards.
| Behavior | Description |
|---|---|
| Trigger | You navigate to or focus a tab matching the rule |
| Dwell | Waits 10 seconds to ensure the page has loaded |
| Capture | Extracts content once after dwell |
| Refetch | Optionally re-extracts at a configurable interval (see below) |
| Stops | When you switch away from the tab or close it |
This mode is event-driven — it only runs while you’re actively viewing a matching page.
While Tab Open (Any-Tab Mode)
Section titled “While Tab Open (Any-Tab Mode)”Best for background monitoring — keeping tabs open that you want periodically captured.
| Behavior | Description |
|---|---|
| Trigger | Chrome Alarm fires at the configured interval |
| Scope | All open tabs matching the rule’s patterns |
| Interval | Configurable (minutes or hours) |
| Capture | Extracts content from every matching tab each cycle |
This mode uses the Chrome Alarms API and runs even when the tabs are in the background.
Refetch
Section titled “Refetch”Refetch extends focused mode for slowly-changing pages — feeds (HN, Reddit, Twitter), dashboards, monitoring pages, or any content that updates over minutes or hours.
Without refetch, focused mode captures once after the 10-second dwell and stops. With refetch enabled, it continues re-extracting at your configured interval while you stay on the page.
Configuration
Section titled “Configuration”Refetch controls appear when a rule has Auto-capture enabled and When focused mode selected:
⊙ Auto-capture [When focused ▾] ☑ Refetch [30] [sec ▾] ☑ Dedup [15] [min ▾]| Setting | Range | Default |
|---|---|---|
| Refetch interval | 10 seconds – 1 hour | 60 seconds |
How Refetch Works
Section titled “How Refetch Works”- You focus a tab matching a focused-mode rule
- After 10s dwell, initial content is extracted and sent
- A
setIntervaltimer starts at your configured refetch interval - Each tick re-extracts the page content
- Dedup checks if content has actually changed before sending
- Timer stops when you switch away, navigate, or close the tab
Refetch + Dedup Interaction
Section titled “Refetch + Dedup Interaction”Refetch and dedup work together to minimize unnecessary API calls:
| Scenario | Result |
|---|---|
| Page unchanged, within dedup window | Skip — no API call |
| Page content changed | Send — new content detected |
| Dedup window expired (even if same content) | Send — acts as a periodic heartbeat |
Deduplication
Section titled “Deduplication”Each rule has its own dedup toggle and configurable window. When enabled, Context Bro computes a SHA-256 hash of the extracted content. If the content hasn’t changed since the last send within the dedup window, it skips the send.
| Setting | Range | Default |
|---|---|---|
| Dedup window | Seconds, minutes, or hours | 15 minutes |
Hashes are stored locally in chrome.storage.local. They are cleared when you clear extension data or uninstall.