

Egg.js – A Simple Way to Add Easter Eggs to Your Site - mikeflynn
http://thatmikeflynn.com/egg.js/

======
notjustanymike
Seems to me you could just use mousetrap.js and get the added bonus of a solid
key capture library.

[https://craig.is/killing/mice](https://craig.is/killing/mice)

~~~
tracker1
I really like the url structure for his projects...

------
jbrooksuk
I did the same thing (but with jQuery) around 5 years ago;
[https://github.com/jbrooksuk/jQuery-
Contra](https://github.com/jbrooksuk/jQuery-Contra)

I'm pretty sure that it's in need of an update...

------
aethr
Does anyone here have experience using easter eggs as a social traffic-driving
tool?

We have a client with a great product (well respected in their field) and one
of our developers spent a weekend voluntarily building a very cool easter egg
for their site. I think posting the easter egg somewhere relevant to their
user base (like a topical subreddit) might be an interesting "campaign" to
drive new users to the site.

Has anyone done this before?

~~~
aethr
Would this be the modern equivalent of "Press 7 to hear a duck quack"? :)

[http://everything2.com/title/If+you+would+like+to+hear+a+duc...](http://everything2.com/title/If+you+would+like+to+hear+a+duck+quack%252C+press+7)

~~~
pooper
Apparently, TD Ameritrade does not share the same sense of humor.

------
mattmalin
There's another lightweight version to do this here:
[https://github.com/mckamey/konami-js](https://github.com/mckamey/konami-js)

This includes a minified version resulting in a <1 kb addition to code:
[https://github.com/FlorianBezagu/Konamiz/blob/master/konamiz...](https://github.com/FlorianBezagu/Konamiz/blob/master/konamiz.min.js)

Also worth considering is konami-js ([https://github.com/snaptortoise/konami-
js/blob/master/konami...](https://github.com/snaptortoise/konami-
js/blob/master/konami.js)), which treats cases different such as if running
from iphone if not wishing to change to the standard code.

------
Someone1234
Quite similar to cheet.js (sic):

[https://namuol.github.io/cheet.js/](https://namuol.github.io/cheet.js/)

There's is a little more feature rich, but 2x as many characters minified
(appro. 3K for cheet.js Vs 1.5K for Egg.js) which does matter for an Easter
Egg in my opinion (as it should be as close to "free" as possible).

~~~
d55
I like cheet.js better, the code seems much easier to read.

------
llamataboot
First thing I did was check for an easter egg on this site :)

------
peshkira
heads up, in Safari, there is the following error: TypeError: undefined is not
a function (evaluating 'Number.isInteger(parseInt(a, 10))')

~~~
mikeflynn
Thanks for the heads up! Jumping on it now.

Edit: All fixed!

