Hover, click, and capture any web element as Markdown (HTML, CSS, selector) plus a cropped screenshot. Built for AI-assisted development hand-off.
- Hover highlight with tag + dimensions, click (or Tab + Enter) to capture
- Pixel-accurate screenshots via
tabs.captureVisibleTab+ crop - Optional
html2canvasfallback for off-screen elements - Robust selectors (id,
data-testid,data-*, class chain, nth-of-type path) - Meaningful computed CSS only, React component + Tailwind hints
- Auto-copy Markdown (+ best-effort PNG), result dialog with HTML / CSS / Selector tabs
- Keyboard accessible dialog (focus trap, Esc, arrow-key tabs), screen-reader status
- Minimal permissions:
activeTab+storage
- Open
chrome://extensions, enable Developer mode. - “Load unpacked” → select the
src/folder in this repo. - Pin Snapcode, press
Ctrl+.(orCmd+.on Mac) on anyhttp(s)page.
Icons in src/icons/ are generated placeholders. Replace with brand art if desired.
- Press
Ctrl+.or use the popup button to start annotation mode. - Hover to highlight, click or Tab + Enter to capture.
- Markdown is copied automatically; use the dialog to copy HTML / CSS / Selector / JSON or save the PNG.
- Press
Escto exit;Escalso closes the dialog.
activeTab: toggle current tab + screenshot visible area on user gesture.storage: future prefs (currently defaults, keysnapcode.prefs.v1).<all_urls>: run on any page the user invokes +captureVisibleTab.- No
downloads,scripting, orclipboardWrite: download uses anchor + Blob, clipboard usesnavigator.clipboard.
src/vendor/html2canvas.min.js is a placeholder. For off-screen capture:
curl -L -o src/vendor/html2canvas.min.js \
https://cdn.jsdelivr.net/npm/[email protected]/dist/html2canvas.min.jsThen add "vendor/html2canvas.min.js" to content_scripts.js in manifest.json before capture.js.
npm testTests use Node built-ins only (node:test + vm). They cover Markdown fence safety, truncation, selector escaping, manifest minimality, and static a11y / performance / security contracts.
Load src/ as unpacked extension to smoke test popup, toggle command, highlight, capture, and dialog on a plain http(s) page.
All processing is local. No network calls, analytics, or external services. Screenshots stay in clipboard / downloads chosen by the user.
MIT (html2canvas fallback, if installed, is separately MIT © Niklas von Hertzen).