Created
May 19, 2018 19:41
-
-
Save copleykj/f5be065925c10dfa6261d592bccaadc3 to your computer and use it in GitHub Desktop.
Bookmarklet to automatically download Front End Masters videos
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
javascript:(function(){ | |
const vdo = document.getElementsByTagName("video")[0]; | |
vdo.pause(); | |
const vdoUrl = vdo.src | |
const link = document.createElement('a'); | |
link.href = vdoUrl; | |
link.target= '_blank'; | |
const paths = location.pathname.split('/'); | |
const e = document.createEvent('MouseEvents'); | |
e.initEvent('click' ,true ,true); | |
link.dispatchEvent(e); | |
}()); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment