capture.mjs
Tools · A check on the result · MIT
- What it does
Screenshots a figure with headless Chrome through the browser's own debugging protocol, with no npm packages: whole card, phone width, a hover, key presses, and 4x close-ups of a region. It starts Chrome with a throwaway profile, a local debugging port and file access from files, and reports console problems.
- Get it
node scripts/capture.mjs page.html --out shots/page.png [--width 390] [--hover 0.6,0.5] [--zoom x,y,w,h]
- Needs
Node 20.10 or later; Chrome or Chromium (found in the usual places or through CHROME_PATH)
- License
MIT
- From