Created
November 7, 2013 19:40
-
-
Save alanb1501/7360658 to your computer and use it in GitHub Desktop.
Takes Youtube and makes it full browser window
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 u = document.location.href; | |
if(!u) { alert('Try using on Youtube'); return; } | |
if(u.indexOf('youtube.com') == -1) { | |
alert('Try using on Youtube'); return; | |
} | |
var m = u.match(/v=([\w\d]+)/); | |
if(!m) { | |
alert('Invalid Youtube URL'); return; | |
} | |
var n = "http://www.youtube.com/v/" + m[1]; | |
document.location.href= n; | |
}()); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
http://jsfiddle.net/#&togetherjs=q9kAwPx9e4