DEV Community

J Now
J Now

Posted on

Inline context for every half-known word, without switching tabs

Mid-article, I kept hitting terms I sort of knew — enough to keep reading, not enough to actually understand what I was reading. The options were open a new tab (lose the thread), skip it (stay shallow), or tolerate the friction until I stopped reading entirely. None of those were acceptable.

So I built rabbitholes. Highlight any text and a shadow-DOM tooltip renders an explanation next to your cursor — no new tab, no page reload, no polluted host DOM. The explanation itself is interactive: click any word to explore it, or drag across a phrase to go deeper. The extension tracks how many hops you've gone, so you can follow a tangent four levels into medieval monetary policy and still find your way back.

The part I use most: every answer surfaces two suggested rabbit-hole topics — the threads most worth pulling from that specific explanation. One click and you're there, still inline, still on the same page.

When an explanation alone isn't enough, the globe icon re-fetches the answer enriched with live Brave Search results, with source chips you can click to verify. The pencil icon opens a follow-up input that inherits the current context, so you can ask a narrower question without re-stating everything.

Requests go directly from the browser to api.anthropic.com and api.search.brave.com. No intermediary server, zero telemetry, no analytics. Manifest V3; your API key lives in chrome.storage.sync and never leaves the browser.

// The extension intercepts mouseup, grabs window.getSelection(),
// and sends the selected text + surrounding paragraph as context.
// Shadow DOM means the tooltip can't inherit or clobber host styles.
chrome.runtime.sendMessage({
  type: 'EXPLAIN',
  selection: selectedText,
  context: surroundingParagraph
});
Enter fullscreen mode Exit fullscreen mode

github.com/robertnowell/rabbitholes

Top comments (0)