Created
August 7, 2012 18:21
-
-
Save mbostock/3288044 to your computer and use it in GitHub Desktop.
Google Hurdles
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
function key(type, code) { | |
var e = document.createEvent("Event"); | |
e.initEvent(type, true, true); | |
e.keyCode = code; | |
document.getElementById("hplogo").dispatchEvent(e); | |
} | |
setInterval(function() { | |
key("keydown", 37); | |
key("keypress", 37); | |
key("keyup", 37); | |
key("keydown", 39); | |
key("keypress", 39); | |
key("keyup", 39); | |
}, 10); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment