Skip to content

Instantly share code, notes, and snippets.

@copleykj
Created May 19, 2018 19:41
Show Gist options
  • Save copleykj/f5be065925c10dfa6261d592bccaadc3 to your computer and use it in GitHub Desktop.
Save copleykj/f5be065925c10dfa6261d592bccaadc3 to your computer and use it in GitHub Desktop.
Bookmarklet to automatically download Front End Masters videos
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