Created
May 26, 2018 20:02
-
-
Save neopunisher/f4850a28d5d829ff632b702c08b03b24 to your computer and use it in GitHub Desktop.
take a pic of the current html with svg magic
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
(function(url, inj) { | |
inj(url).then(function() { | |
html2canvas(document.body).then(function(canvas) { | |
document.body.appendChild(canvas); | |
}); | |
}) | |
})('https://html2canvas.hertzen.com/dist/html2canvas.min.js', (src, head = true) => new Promise(function(c, d) { | |
var a = document.createElement("script"); | |
a.src = src; | |
a.type = "text/javascript"; | |
a.onload = c; | |
a.onerror = d; | |
document[head ? 'head' : 'body'].appendChild(a) | |
})) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment