Skip to content

Instantly share code, notes, and snippets.

@adammw
Created January 18, 2011 07:30
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 adammw/784093 to your computer and use it in GitHub Desktop.
Save adammw/784093 to your computer and use it in GitHub Desktop.
YouTube HTML5 "Save Video As..." RickRoll Remover
// Run this on the YouTube page - either in developer tools or elsewhere
if (document.querySelector('a.yt-uix-button-menu-item[href="http://www.youtube.com/watch?v=dQw4w9WgXcQ"]')) { document.querySelector('a.yt-uix-button-menu-item[href="http://www.youtube.com/watch?v=dQw4w9WgXcQ"]').href = document.querySelector('video').src; }
// Note to YouTube: This stupid stunt just makes people angry - don't rickroll the users of your site. In fact, adding the link just helps the downloaders as extensions need much less work to add a context menu now, all they have to do is hook into your save video as link.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment