A Chrome MV3 extension that extracts the main article off any webpage, sends it to a small NestJS proxy holding a Gemini key, and renders the summary in the popup while marking the key sentences inline on the page itself. Per-URL + per-brevity caching means a second click is free.
Heuristic extraction over Mozilla Readability
The content script tries semantic selectors first — article, main, [role="main"], common content classes — and falls back to a stripped body with nav, header, footer, aside, scripts, and iframes removed. Readability would be more accurate on messier layouts; the heuristic is thirty lines and Gemini handles messy input well, so the cost/benefit did not justify the dependency.
Hosted proxy over user-supplied keys
The Gemini API key lives on a small NestJS proxy, not in the extension. The user gets zero setup; I accept cold boots and bear the API bill. The proxy calls gemini-2.5-flash with a structured-output schema and returns parsed JSON the extension can render without re-validating.
XSS-safe in-page annotation
Highlighting writes nothing to innerHTML. The content script walks the article DOM, locates each key sentence as a Range, and calls Range.surroundContents on a mark element. Pages on chrome://, chrome-extension:// and the Chrome Web Store cannot be scripted — the popup detects those and shows a friendly error instead of failing silently.