Created
January 10, 2023 04:06
-
-
Save SimonTheCoder/af8ffffef46aaa7079c2e8bfa00195ef to your computer and use it in GitHub Desktop.
Save canvas to image. Use it in browser console.
This file contains 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
var clist = document.getElementsByClassName("inner_page");//change class name to yours or use other getElementXXX functions | |
var newTab = window.open('about:blank','canvase_to_image'); //need enable popup window for current site | |
for(ind=0;ind<clist.length;ind++){ | |
var dataURL = clist[ind].toDataURL("image/png"); | |
newTab.document.write("<img src='" + dataURL + "' alt='"+clist[ind].id+"'/><br/>"); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment