DEV Community

J Now
J Now

Posted on

Reading rabbit holes: tracking how deep you go on any article

I kept hitting the same wall: a concept I half-understood would appear, I'd skip it, and by the end of the article I'd have a shallow read built on shaky foundations. The fix I wanted was simple — inline explanations, right where the unfamiliar term appears, without leaving the page.

So I built rabbitholes, a Chrome extension that highlights text and renders an explanation in a shadow-DOM tooltip next to your cursor. The shadow DOM matters: it doesn't leak styles into the host page, so the tooltip looks consistent everywhere without breaking the site's layout.

The part I use most is the rabbit-hole counter. Every explanation ends with two suggested follow-up topics. Click one, get another explanation, counter ticks up. It tracks your full trail — so when you end up at 'philosophy' from an article about Byzantine architecture, you have a shareable path showing exactly how you got there. The Wikipedia philosophy game (every article eventually reaches Philosophy if you keep clicking the first link) works the same way, but for your own reading.

From inside any explanation you can also:

  • Drag across words in the response to select a phrase and explore it
  • Hit the pencil icon to type a follow-up question that inherits the current context
  • Hit the globe icon to re-run the answer enriched with Brave Search results, with source chips to click through

Requests go directly from the browser to api.anthropic.com and api.search.brave.com — no intermediary server, zero telemetry. Your Anthropic API key sits in chrome.storage.sync and never leaves the browser.

// No server. Extension calls the API directly.
const response = await fetch('https://api.anthropic.com/v1/messages', {
  method: 'POST',
  headers: {
    'x-api-key': await getStoredKey(),
    'anthropic-version': '2023-06-01',
    'content-type': 'application/json'
  },
  body: JSON.stringify({ model: 'claude-haiku-4-5', max_tokens: 512, messages })
});
Enter fullscreen mode Exit fullscreen mode

Built on Manifest V3. Full source at github.com/robertnowell/rabbitholes

Top comments (0)