Created
July 28, 2015 13:23
-
-
Save copleykj/1f285d6720cff0a90603 to your computer and use it in GitHub Desktop.
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
//Join into single line and add to chrome or firefox as a bookmark and run on lynda video page with html5 video enabled | |
//will not work with lynda's flash video player | |
javascript:(function(){ | |
var vdoUrl = $("video").attr("h264"); | |
var link = document.createElement('a'); | |
link.href = vdoUrl; | |
var fileName = vdoUrl.substring(vdoUrl.lastIndexOf('/') + 1, vdoUrl.length); | |
link.download = fileName; | |
var 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