Created
August 12, 2025 13:13
-
-
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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