How samyakshrma/focusgate works
Purpose and activation model
Focus Gate is a load-unpacked Chromium extension that blocks a fixed set of distracting domains. It deliberately has no popup, options UI, background logic, or in-extension enable/disable control; Chrome/Edge/Brave’s extension toggle is the control boundary.
Core extension metadata is in manifest.json.
Request-blocking policy
Network/navigation interception is defined declaratively in rules.json, using Chromium’s declarative net-request rules. Each rule matches a target domain and redirects matching requests to the extension-owned blocked page.
The policy boundary is:
• rules.json — domain match rules, rule IDs, and redirect targets
• manifest.json — grants/registers the ruleset with the browser
Generated ruleset artifact
The browser-consumable indexed form of the rule policy is present under _metadata/generated_indexed_rulesets/, including _metadata/generated_indexed_rulesets/_ruleset1. This is generated extension metadata rather than an application runtime stage; the source of blocklist changes remains rules.json.
Redirect and blocked-page flow
When a URL matches a blocking rule, the browser redirects it to blocked.html, passing a site label through the redirect extension path. The blocked page is therefore the only user-facing extension surface and acts as the terminal destination for blocked navigation.
Relevant paths:
• rules.json
• blocked.html
Packaging and browser runtime
The extension runs entirely inside the Chromium extension platform and relies on the browser’s declarative request engine rather than a server or external API. It is installed from the repository folder via “Load unpacked,” so the directory must remain available on disk.
Key package assets:
• manifest.json
• icons/
• blocked.html
Change and deployment boundary
Changing blocked domains is a source-policy edit: update rules.json, then reload the unpacked extension from the browser extensions page. There is no build service, backend, database, authentication layer, or external runtime indicated by this repository.
Components 10
Extension package
Loaded unpacked from the repository directory.
- Manifest · Registers permissions and the declarative ruleset.
manifest.json - Blocklist rules · Defines domain matches, IDs, and blocked-page redirects.
rules.json - Indexed ruleset · Browser-consumable generated form; not the source of policy changes.
_metadata/generated_indexed_rulesets/_ruleset1 - Blocked page · Terminal page for redirected blocked navigations.
blocked.html - Icons
Chromium runtime
- Load unpacked · Browser loads the repository directory directly.
- Installed extension · Enabled or disabled only through the browser extension toggle.
- Declarative request engine · Applies registered rules without extension background logic.
- Matching navigation
- Extension reload · Required after source-policy changes.
Connections 11
- Manifest → Blocklist rules: registers
- Blocklist rules → Indexed ruleset: indexed as
- Manifest → Icons: packages
- Load unpacked → Installed extension: installs
- Manifest → Installed extension: defines package
- Installed extension → Declarative request engine: activates ruleset
- Indexed ruleset → Declarative request engine: consumed by
- Matching navigation → Declarative request engine: evaluated by
- Declarative request engine → Blocked page: redirects matches · Passes a site label through the redirect extension path.
- Blocklist rules → Extension reload: changes require
- Extension reload → Installed extension: refreshes