Skip to content

Instantly share code, notes, and snippets.

@alanb1501
Created November 7, 2013 19:40
Show Gist options
  • Save alanb1501/7360658 to your computer and use it in GitHub Desktop.
Save alanb1501/7360658 to your computer and use it in GitHub Desktop.
Takes Youtube and makes it full browser window
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;
}());
Copy link

ghost commented Nov 7, 2013

Copy link

ghost commented Nov 7, 2013

Copy link

ghost commented Nov 7, 2013

Copy link

ghost commented Nov 7, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment