Last active
August 29, 2015 14:18
-
-
Save misson20000/8a20b8f9dff3e2018440 to your computer and use it in GitHub Desktop.
Ludum Dare Theme Slaughter Key Shortcuts
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 Ludum Dare Theme Slaughter Keyshortcuts | |
// @namespace xenotoad.net | |
// @include http://ludumdare.com/theme/* | |
// @version 1 | |
// @grant none | |
// ==/UserScript== | |
// A: Good | |
// S: Slaughter | |
// D: Bad | |
document.addEventListener("keyup", function(evt) { | |
var s = String.fromCharCode(evt.keyCode); | |
var a = document.getElementsByTagName("a"); | |
console.log(s); | |
if(s == "A") { | |
window.location = a[1].href; | |
} else if(s == "S") { | |
window.location = a[3].href; | |
} else if(s == "D") { | |
window.location = a[2].href; | |
} | |
}, false); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment