Cornify Konami easter egg plugin with jQuery
No doubt you've heard that Cornifying is the latest and greatest invention of the internet.
Now you can surreptitiously add it to your own sites, joining The Underground Cabal of Mirthful Protectors of the Corn:
var kkeys = [], konami = "38,38,40,40,37,39,37,39,66,65"; $(document).keydown(function(e) { kkeys.push( e.keyCode ); if ( kkeys.toString().indexOf( konami ) >= 0 ){ $(document).unbind('keydown',arguments.callee); $.getScript('http://www.cornify.com/js/cornify.js',function(){ cornify_add(); $(document).keydown(cornify_add); }); } });
After a user hits the Konami code (up,up,down,down,left,right,left,right,b,a), every other keystroke will add happiness to the world.
You'll find this website has already been enabled. Try it out. :)
2010.05.29: BoingBoing will probably add it. And yeah this feature kinda triggered a meme. :p
Follow me on twitter: @paul_irish
LOL. That is awesome.
This is hilarious - the most useful thing I've read in a long time!
HAHA! That's the best thing I've seen all week.
Best. Friday. post. ever.
This made my day.
That is so completely useless that I love it.
I love it!
Awesome! I'm going to have to memorize the secret key sequence XD
The problem with this code is that when I hit b and a in Safari 4, it automatically brings up the search bar and it puts the b and a into the search and starts looking for all words on the page that start with "ba"
And whatever this code is supposed to do, I have yet to see it in action…..Quite sad really :-(
Where should the code be put in the site for it to work?
Bonnie, if you include jQuery,
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>Then you can just do
yeah, can you get us a "how to install this code for dummies" version? i'd like to try it on my site.
how do you get the pictures on top of everything and not expand the page downwards? I'm trying to get it like the espn page.
Anyone know how to do it in PHPBB3?
Tried this on my personal site (in the section in the index.html) as well as my vbulletin site (inside the index.php) and cant get it working. I also included the link #10 above showed, which I still cant get to work
hahaha! that's really cool. what's up with the weird domain names you're putting out? they area breaking my regex lol
Installed this on my web site but it only works if you first click inside the site with the mouse… some kind of focus issue?
So awesome it hurts! THANX!
That's pretty awesome. I released a similar piece of code at konami-js.googlecode.com. It's a slightly different approach, but it doesn't use jQuery or have any of the pretty unicorns and rainbows - but you can always add them!
@Alex
Firefox does the same thing. You can go into Tools –> Settings and on the advanced tab, there is an option for turning off "find text when I start typing" or something similar.
Hey thanks that was awesome, I took the code and made some custom changes
Thanks again
Nice. But, How do i stop it?
I want to find good pop music. Help me please.