Skip to content

Instantly share code, notes, and snippets.

@maximelafarie
Created August 16, 2018 15:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save maximelafarie/47f07becf0880f3ad7993c93c3ec3347 to your computer and use it in GitHub Desktop.
Save maximelafarie/47f07becf0880f3ad7993c93c3ec3347 to your computer and use it in GitHub Desktop.
Outrunning space cheat
// 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