Created
October 1, 2014 00:25
-
-
Save tomdwaggy/6355bd6bd50210d60b5c to your computer and use it in GitHub Desktop.
Youtube Set Focus on Keypress
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
// ==UserScript== | |
// @name Youtube Set Focus on Keypress | |
// @namespace http://muckdragon.info/userscripts | |
// @version 0.1 | |
// ==/UserScript== | |
(function(){ | |
document.addEventListener('keydown', function(e) { | |
// pressed alt+g | |
if (e.keyCode == 71 && !e.shiftKey && e.ctrlKey && e.altKey && !e.metaKey) { | |
document.getElementById("movie_player").focus(); | |
} | |
}, false); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment