Skip to content

Instantly share code, notes, and snippets.

@dsebastien
Created August 12, 2025 13:13
Show Gist options
  • Save dsebastien/cf15c96c49d8a9dea2111304920aceaa to your computer and use it in GitHub Desktop.
Save dsebastien/cf15c96c49d8a9dea2111304920aceaa to your computer and use it in GitHub Desktop.
Oneliner that you can paste in the browser's console to find and dump/download all currently loaded Canvas elements
document.querySelectorAll('canvas').forEach((c,i)=>{try{const d=c.toDataURL();console.log(`Canvas ${i+1}: ${c.id||'no-id'} (${c.width}x${c.height})`,d);const a=document.createElement('a');a.download=`canvas_${i+1}_${c.id||'unnamed'}.png`;a.href=d;a.click();}catch(e){console.log(`Canvas ${i+1} error:`,e.message);}});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment