Hacker News new | ask | show | jobs
by jolt 4587 days ago
Nice! Another idea would be to use events in stead of keys in the sequence, something like:

"click:#elem1 click:#elem2 keyup:13"

That would enable you to make slightly more advanced easter eggs or "cheets"

1 comments

I went ahead and made this[1]. The implementation is a little different from the way you do it, and it uses jQuery to create the events, but it supports sequences of click events using jQuery selectors like in my original comment, other events could be added without much effort.

The implementation is not at all as neat as the original, and i haven't done thorough testing, i just had an idea and tried it out.

[1] https://github.com/jonlt/cheet.js

Good idea; I'd incorporate your changes but I'm trying to keep it dependency-free, for now.

I could support '#id' without any dependencies pretty easily, though...