Every week I had to write bug reproduction steps, internal admin SOPs, or onboarding guides. Cloud tools like Scribe and Tango are great, until you run into two walls:
- Privacy & localhost: You can't upload screenshots of staging environments, VPN-only admin panels, or client dashboards to third-party servers.
- Per-seat subscriptions: Paying $23–$29/user/month (with basic blur/redaction locked behind Enterprise) just to turn browser clicks into Markdown/PDF felt crazy.
So I built Step2MD — a 100% local-first Manifest V3 Chrome extension (vanilla JS, zero backend, zero login) that records your clicks, lets you edit/blur any screenshot afterward in a fullscreen HD Studio, and exports clean Markdown ZIPs or printable PDFs.
Along the way, building a purely client-side MV3 extension hit 3 genuinely nasty browser edge cases that might save you hours if you ever build a Chrome extension or screenshot tool.
1. Inline Base64 Images Break in GitHub Issues & Notion (So I Wrote a Zero-Dependency ZIP Bundler)
My v1 exported a single .md file with screenshots embedded as inline data:image/jpeg;base64,... data URIs. It looked fine in VS Code preview — and completely broke the moment I pasted it into GitHub Issues or Notion (both strip data: image URIs for security, plus a 10-step Markdown file becomes an unreadable 3 MB wall of text).
Since Step2MD has zero backend (no CDN to upload images to), the cleanest offline solution was exporting a real .zip archive containing:
step2md-guide.zip ├── README.md # clean  links └── images/ ├── step-1.jpg ├── step-2.jpg └── step-3.jpg Because JPEGs are already compressed, you don't even need Deflate — a standard ZIP STORE (compression method 0) builder with a CRC-32 table takes ~120 lines of dependency-free vanilla JS (DataView + Uint8Array), runs in milliseconds inside the browser, and drops straight into GitHub repos, Obsidian vaults, or VS Code.
2. Manifest V3 CSP Silently Blocks window.print() Inside blob: Tabs
For non-technical clients who just want a clean PDF, v1 generated a self-contained HTML string with <button> and opened it from the popup:
const blob = new Blob([html], { type: 'text/html;charset=utf-8' }); chrome.tabs.create({ url: URL.createObjectURL(blob) }); Three silent bugs blew up in production:
- MV3 CSP killed the Print button: A
blob:URL created by an extension gets the originblob:chrome-extension://<id>/..., which inherits MV3's strictscript-src 'self'policy. Clicking the button threwExecuting inline event handler violates Content Security Policyand did nothing. - Revoked blobs on popup close: The moment
chrome.tabs.create()opens a new tab, Chrome closespopup.html— destroying the popup's document and revoking itsblob:URLs! PressingF5immediately hitERR_FILE_NOT_FOUND. - Invisible step numbers in PDF: Without
print-color-adjust: exact, Chrome strips CSS background colors by default when printing — turning white numbers inside indigo circles invisible!
The fix: Replace the blob: tab with a real dedicated extension page (preview.html + external preview.js) that reads steps directly from chrome.storage.local, wires addEventListener('click', () => window.print()) cleanly under MV3 CSP, waits for all images to decode (decoding="sync" instead of loading="lazy"), and enforces print-color-adjust: exact + @page sizing so 2 steps fit cleanly per page.
3. Fast SPA Routers Unmount the Clicked Button Before captureVisibleTab() Runs
This one was caught by a real user testing Step2MD on a Next.js/React admin app. Every time he clicked a list item (like "Events" or an event row), the exported screenshot showed a black loading spinner with the numbered highlight box drawn over empty space!
Here's why that race condition happens:
-
clickfires onmouseup, at which point React/Vue/Next routers synchronously unmount the list and render a loading skeleton on the very same frame. - Sending a message from
content.jsto the MV3 service worker + awaitingchrome.storage.local.get()adds 30–80 ms beforechrome.tabs.captureVisibleTab()finally executes — way too late.
The fix (2 parts):
- Synchronous
pointerdownpre-capture: In capture phase onpointerdown(0 ms delay, beforemouseuptriggers navigation),content.jssnapshots the element's bounding rect + label and fires aPRE_CAPTUREmessage. The service worker callscaptureVisibleTab()synchronously before anystorage.getawaits and caches the in-flight Promise pertabId(2.5 s TTL). Whenclickconfirms the interaction,CAPTURE_STEPawaits that exact pre-navigation screenshot — and if the user drags away without clicking, the cached capture is silently discarded. - Automatic "Final result" screenshot on Stop: When clicking Stop, we hide the floating toolbar (70 ms repaint) and capture one last clean frame so the guide always shows the final screen after the last click.
Try It & Roast It
If you document internal apps, localhost staging, or QA bug repros and want something 100% local:
- Chrome Web Store: Step2MD — Step-by-Step Guide Recorder
- Website & Pricing: step2md.pages.dev (Free up to 10 steps per guide with the Fullscreen HD Studio, local blur, ZIP & PDF exports included; optional 19€ one-time Pro for unlimited steps).
Curious what other Manifest V3 gotchas folks here have hit with captureVisibleTab or OffscreenCanvas — and if you're a dev/QA, would auto-attaching console.error + failed 4xx/5xx network logs per step be useful in a future version?