4 ms·
Cheet.js: Easter eggs (Konami Code, etc.) for your site
- deleted 13y ago[deleted]
- namuol 13y agoI 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
- quarterto 13y agoLooks 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 13y agoWelp. I wouldn't have made cheet.js if I knew about Mousetrap. Oh well, it was just a fun one-night project anyway. :)
- stickhandle 13y agoIn 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
- crindy 13y agoThis looks really cool and sleek! I may just use this somewhere.
- jcutrell 13y agoI 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 13y agoNice! 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 13y agoI 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 13y agoGood 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...
- JayNeely 13y agoAny 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 13y agoI figured people on HN weren't afraid to "View Source" ;)
- camilo_u 13y agoMakes me remember the good old raptorize plugin: http://zurb.com/playground/jquery-raptorize http://zurb.com/playground/jquery-raptorize
- elwell 13y agoDoesn't this defeat the purpose of an "easter egg"?