Skip to content

Instantly share code, notes, and snippets.

@Explosion-Scratch
Created December 15, 2020 13:16
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 Explosion-Scratch/117c72618132b8835f497b970c939e98 to your computer and use it in GitHub Desktop.
Save Explosion-Scratch/117c72618132b8835f497b970c939e98 to your computer and use it in GitHub Desktop.
Download from YouTube bookmarklet
//Select the line below and drag it into your bookmarks bar. Then when on a YouTube video click it!
javascript: {var url=window.location.href;if(/https:\/\/(www|)\.youtube\.com\/watch\?v=[A-Za-z0-9]+/i.test(url)){var newurl=`https://4n8hm.sse.codesandbox.io/download?URL=${url}&format=${prompt("What format would you like to download?","mp4")||"cancel"}&quality=${prompt("What quality would you like to download? (highest, lowest, highestaudio, lowestaudio, highestvideo, lowestvideo)","highest")||"cancel"}`;newurl.includes("cancel")?alert("You canceled the download"):window.location.href=newurl}else alert("Invalid url!");}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment