
Cheet.js: Easter eggs (Konami Code, etc.) for your site - namuol
http://namuol.github.io/cheet.js/
======
quarterto
Looks nice, but not sure why I'd use this over the more general-purpose
Mousetrap[1]?

[1]: [http://craig.is/killing/mice](http://craig.is/killing/mice)

~~~
namuol
Welp. I wouldn't have made cheet.js if I knew about Mousetrap.

Oh well, it was just a fun one-night project anyway. :)

------
stickhandle
In use on his personal site:
[http://namuol.github.io/](http://namuol.github.io/)

Konami: up up down down left right left right b a

God-mode: i d d q d

google: g o o g l e

------
namuol
I would've called it cheat.js but there was at least one other library out
there with the name.

Also, it's a surprisingly-SFW Urban Dictionary term that I find amusing:
[http://www.urbandictionary.com/define.php?term=Cheet](http://www.urbandictionary.com/define.php?term=Cheet)

------
jcutrell
I like the concept of implementing the "waiting" function of responding to a
cheat code as an asynchronous promise-style callback. I think this should be
used more often in event-driven stuff, even when it's not explicitly
"asynchronous" as much as it is a conditions-based response.

------
jolt
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"

~~~
jolt
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](https://github.com/jonlt/cheet.js)

~~~
namuol
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...

------
camilo_u
Makes me remember the good old raptorize plugin:
[http://zurb.com/playground/jquery-
raptorize](http://zurb.com/playground/jquery-raptorize)

------
JayNeely
Any hints on easter eggs on the site that you don't provide instructions for?
I tried your name, the project name, etc.; disappointed there wasn't more to
discover.

~~~
namuol
I figured people on HN weren't afraid to "View Source" ;)

------
elwell
Doesn't this defeat the purpose of an "easter egg"?

------
crindy
This looks really cool and sleek! I may just use this somewhere.

