Created
April 29, 2012 21:08
Revisions
-
bagrow revised this gist
Apr 29, 2012 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1,7 +1,7 @@ javascript: var youtubeid = getQueryVariable("v"); if (youtubeid != undefined){ window.location="http://youtube.googleapis.com/v/"+youtubeid+"&autoplay=1"; } function getQueryVariable(variable) { -
bagrow created this gist
Apr 29, 2012 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,18 @@ javascript: var youtubeid = getQueryVariable("v"); if (youtubeid != undefined){ window.location="http://youtube.googleapis.com/v/"+youtubeid; } function getQueryVariable(variable) { /* courtesy: http://stackoverflow.com/a/1623707 */ var query = window.location.search.substring(1); var vars = query.split("&"); for (var i=0; i < vars.length; i++) { var pair = vars[i].split("="); if (pair[0] == variable) { return pair[1]; } } /*alert('Query Variable ' + variable + ' not found');*/ }