Last active
May 18, 2018 00:26
-
-
Save neopunisher/d3d313e2a617653492c51f3ee581cc3b to your computer and use it in GitHub Desktop.
grabs a frame out of youtube
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
(function(z){ | |
var a=z.querySelector("video"),b=z.createElement("canvas"),c=b.getContext("2d"),d=z.createElement("a");b.width=a.videoWidth;b.height=a.videoHeight;c.drawImage(a,0,0);d.download="FileName.png";d.href=b.toDataURL();z.body.appendChild(d);d.click();z.body.removeChild(d); | |
})(document) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment