Skip to content

Instantly share code, notes, and snippets.

@dpraul
Created October 30, 2014 20:47
Show Gist options
  • Save dpraul/e2ef0a75ec982196d54e to your computer and use it in GitHub Desktop.
Save dpraul/e2ef0a75ec982196d54e to your computer and use it in GitHub Desktop.
Better YouTube Layout Bookmarklet
javascript:(function() {
var url = window.location + "";
// Make sure we are on YouTube
if (url.indexOf("www.youtube.com/") < 0)
return;
// Grab video id.
var video = url.split("v=")[1]
if (video.indexOf("&") > 0)
video = video.split("&")[0]
// Make new URL
url = "https://youtube.googleapis.com/v/" + video;
//url = "https://www.youtube.com/embed/" + video; // Alt.
window.location = url;
}());
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment