Created
October 30, 2014 20:47
-
-
Save dpraul/e2ef0a75ec982196d54e to your computer and use it in GitHub Desktop.
Better YouTube Layout Bookmarklet
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
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