Skip to content

Latest commit

 

History

History

README.md

Vitreous Focus — browser extension (standalone MVP)

A companion browser extension for the Vitreous focus app. When Focus is on, it redirects distracting websites — and any already-open distracting tabs — to a liquid-glass "Blocked by Vitreous" page.

This is the standalone first step: it has its own on/off toggle and bundles the same default website list as the app. A later step will let the app's Start Focus button drive it automatically.

Load it in Chrome or Edge

  1. Open chrome://extensions (or edge://extensions).
  2. Turn on Developer mode (top-right).
  3. Click Load unpacked and select this extension/ folder.
  4. Pin Vitreous Focus from the puzzle-piece menu so its icon is visible.

Use it

  1. Click the Vitreous Focus icon to open the popup.
  2. Flip the Focus toggle on.
  3. Every open YouTube / Reddit / etc. tab flips to the block page, and new attempts to visit a blocked site show it too.
  4. Toggle off to browse normally again.

How it works

  • blocklist.js — bundled default domains + isBlocked() matching (covers subdomains like m.youtube.com). Unit-tested via the repo's node --test.
  • background.js — service worker; redirects blocked navigations and sweeps open tabs when Focus turns on.
  • popup.* — the on/off toggle (state stored in chrome.storage.local).
  • blocked.* — the block page, styled to match the app.

Activity reporting

When Focus is active and the extension blocks a site, it sends a small { t: "web_block", domain } message to the local Vitreous app over the existing loopback WebSocket (127.0.0.1 only). The app records it for the Reflections tab. Nothing leaves your machine — it is the same local connection used to sync Focus state.

Not yet (next steps)

  • Driven by the app's Start Focus button (native messaging).
  • Editing the list from the extension.
  • Firefox support and custom icons.