cheatcode.js Just a late night hack. Usage like so:
var c = new CheatCode();
c.register("drizzydrake", function(){
console.log("6!x");
});
c.register("ArrowLeftArrowRightArrowLeft", function(){
// do something cool, or waste the user's time
console.log("you probably have work to do")
});
//TODO:
- add a timeout option. currently you can wait until the heat death of the universe to type the last letter and it'll still work
Could you explain the purpose of this hack? I'm just curious for a real use case example.