Created
January 30, 2015 01:09
-
-
Save chandu-io/1b86131eff047e30f63c to your computer and use it in GitHub Desktop.
bookmarklet :: open youtube links fullscreen
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 characters
| (function(w) { | |
| var y = 'youtube.com'; | |
| [].slice.call(w.document.getElementsByTagName('iframe')).forEach(function(f) { | |
| if (!f.src.toLowerCase().contains(y + '/embed/')) { return; } | |
| w.open('//' + y + '/v/' + f.src.split(/\/embed\//i)[1].substr(0, 11), '_blank') | |
| }); | |
| })(window) |
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 characters
| javascript:(function(w){var y="youtube.com";[].slice.call(w.document.getElementsByTagName("iframe")).forEach(function(f){if(!f.src.toLowerCase().contains(y+"/embed/")){return}w.open("//"+y+"/v/"+f.src.split(/\/embed\//i)[1].substr(0,11),"_blank")})})(window) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment