Created
August 16, 2018 15:12
-
-
Save maximelafarie/47f07becf0880f3ad7993c93c3ec3347 to your computer and use it in GitHub Desktop.
Outrunning space cheat
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
// Paste below script in dev console before pressing any key :) | |
// | |
// Play here: https://v6p9d9t4.ssl.hwcdn.net/html/1005038/index.html#0#%20PRESS%20ANY%20KEY%20TO%20START | |
// | |
window.addEventListener('popstate', function(e){ | |
if (e.srcElement.location.hash.indexOf('X_o') !== -1 || e.srcElement.location.hash.indexOf('Y_o') !== -1) { | |
console.log('JUMP !'); | |
var jump = new KeyboardEvent('keydown',{'keyCode':32,'which':32}); | |
document.dispatchEvent(jump); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment