Skip to content

Instantly share code, notes, and snippets.

@edibiase
Created January 9, 2009 20:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save edibiase/45274 to your computer and use it in GitHub Desktop.
Save edibiase/45274 to your computer and use it in GitHub Desktop.
javascript:if%20(document.getElementById('download-youtube-video')==null%20&&%20!!(document.location.href.match(/http:%5C/%5C/%5Ba-zA-Z%5C.%5D*youtube%5C.com%5C/watch/)))%20%7Bvar%20yt_mp4_path='http://www.youtube.com/get_video?fmt=18&video_id='+swfArgs%5B'video_id'%5D+'&t='+swfArgs%5B't'%5D;%20var%20div_embed=document.getElementById('watch-embed-div');div_embed.innerHTML=div_embed.innerHTML+'%3Cbr%20/%3E%20%3Cspan%20id=%5C'download-youtube-video%5C'%3E%3Ca%20href=%5C''+yt_mp4_path+'%5C'%3EDownload%20as%20MP4%3C/a%3E%20(right-click%20and%20select%20%3Ci%3ESave%20'+%20(navigator.appName=='Microsoft%20Internet%20Explorer'?'target':'link')%20+'%20as%3C/i%3E)%3C/span%3E';%7Dvoid(0);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment