ish-bot-chrome-network-extension: The Chrome Extension That Lets Nothing Load Unless It Says So
A tiny Manifest V3 bot shim blocks every main-frame navigation, then whitelists selected tabs with higher-priority session rules.
- This repo treats Chrome as a permission boundary, not just a browser.
- A global session rule blocks every main-frame load until a tab-specific allow rule overrides it.
- The one-second delay is a synchronization clue, not a convenience feature.
- The pattern is narrower than Puppeteer or Selenium, but sharper for control over admission itself.
A browser that starts locked
Most automation stacks open the page first and enforce policy later. This repo flips that order. It installs a blanket block on main_frame navigations, so a new tab does not get to load anything unless a higher-priority rule says that tab is allowed.
const GLOBAL_BLOCK_ID = 1;
async function lockBrowser() {
await chrome.declarativeNetRequest.updateSessionRules({
addRules: [{
id: GLOBAL_BLOCK_ID,
priority: 1,
action: { type: 'block' },
condition: {
resourceTypes: ['main_frame']
}
}]
});
}
function allowTab(tabId) {
return chrome.declarativeNetRequest.updateSessionRules({
addRules: [{
id: tabId,
priority: 2,
action: { type: 'allow' },
condition: {
tabIds: [tabId],
resourceTypes: ['main_frame']
}
}]
});
}
That is the whole trick in miniature. A low-priority session rule says no to every main-frame request, then a tab-scoped rule with a higher priority says yes to one specific tab. The browser is no longer a neutral surface. It is an access-controlled perimeter.
This is not ad blocking
Ad blockers trim unwanted content inside a page. This extension decides whether the page exists at all. The repo is correspondingly small: a manifest, a background service worker, and an isolated content script placeholder. That simplicity is not a limitation. It is the point.
The rule engine is the product
The elegance here is in the API choice. The extension uses session rules, not permanent rules, so the browser returns to default-deny when the session ends. It also uses the tab ID as the rule ID, which makes each allow rule easy to target and remove later. That is the kind of small design decision that keeps a control plane from turning into a mess.
Why the 1-second blackout matters
The timeout is the tell. If the allow rule appeared immediately, this would be a simple toggle. The one-second gap suggests the author is managing timing across tab creation, service worker wakeup, and the first navigation event. That makes the repo feel less like a filter and more like a race-condition workaround with opinions.
What’s actually happening under the hood is something much stranger and more significant: a local AI agent that physically controls your web browser, navigates authenticated sessions, clicks buttons, fills forms, and reports back to you over Telegram while you’re away from your desk.
What it beats, and what it does not
Compared with general browser automation, this pattern moves earlier in the stack. It does not try to type faster or click better. It decides who gets to load in the first place.
| Approach | Control point | Auth/session model | Complexity | Best use case |
|---|---|---|---|---|
| This repo | Main-frame network admission | Tab-scoped session rules | Low | Granting or revoking page loads themselves |
| Selenium or Puppeteer | Script-driven DOM and page flow | Login happens inside the automation flow | Medium to high | General browser workflows and test automation |
| CDP relay agents | Remote control of a live browser | Uses the host browser's existing cookies and state | Medium | Powerful control of a real authenticated session |
| Profile-copy agents | Launch from a copied browser profile | Cloned cookies and local storage | Medium | Fast startup with familiar login state |
The larger lesson
The big idea is not that Chrome can be blocked. It is that browser agents are moving from DOM choreography to session governance. Whoever controls the first request controls the timing of login, the shape of the session, and the blast radius of automation. That is why this repo matters even though it fits in a handful of files.





