Konami Code on Facebook : How to implement it on your site

Yesterday while chatting with friends, I discovered an unusual thing on facebook. Unusual because I didn’t see any sense in what I saw back then. The process to discover this unusual thing is as follows:

How to view lens flare on facebook
1. Login to facebook.com
2. Click once anywhere on your home page
3. Click the following sequence of characters using your keyboard
4. Up, Up, Down, Down, Left, Right, Left, Right, B, A, Enter Key
5. Click again on the page or try to scroll the page up or down

If everything is done correctly you will see something like this:
lensflare on facebook

On more investigation I found out this unusual thing is nothing but “Konami Code“, which is a cheat code that appears in many Konami video games. The Konami code was introduced to many gamers in the 1988 NES version of Contra. Due to the game’s intense difficulty, many Contra players became reliant on the cheat code, which increased the player’s lives from 3 to 30 (9 to 90 including continues), to finish the game. The game’s popularity, combined with the near-necessity of using the code, made it renowned to an entire generation of video game players. This led to the code being used in countless games, and even mentioned across popular culture.

Once the cheat code is entered, facebook extends it to enable Lens Flare on all the pages you visit thereafter. You can use the below code, to enable-disable komani code on your site, and thereafter extend it to anything you want to:

  <body onload="$.init()" onkeydown="$.konamiCode(event)">

Try out once on facebook and then come back to grab it for your site.

  • James

    Good work but how the hell did you find this out dude?

  • Hi Abhi!

    Don’t you think your code is a bit verbose? I do.. so I wrote a post about it over at unwrongest. Other than that, nice post!

  • Hi Jan,

    I already did made a comment abt it at your post. Nice tweetable code. However I never thought of making it small or tweetable 😉 Self explainatory was my main focus 🙂
  • Samsonsa

    Nice post. After some googling I landed up here. http://konamicodesites.com/ have list of all konami code powered sites 😀

  • WoW man .this shit really works oh ! i tried it and it worked !damn i  am so socked right now !!! i evn made a status on to do it .so evr one can c !! oh ok so how do i stop it now pls !

  • Kishore

    @Jan: Which code do you think will do its job well after I have pressed like 1000 keys  on that website 😛

  • @Kishore: Very much true, since the event is still not disabled in @Jan’s code, the javascript will slow down the things because of un-necessary processing on each key press…..

  • Pingback: Konami Code on Facebook : How to implement it on your site …()

  • I’d passion to cia geezer that too!

  • Great that you found this out! Thanks for posting.

  • Pingback: Código Konami en Javascript | aNieto2K()

  • this code works in ISSS Deluxe ( Internation Super Star Soccer ) for SNES, an what you can get?? a dog referee.

    Doesn’t do much, but it’s funny to get a yellow card from a dog.

    Great post.

  • Pingback: JavaScript 实现 Konami Code –彩蛋 | 来客轩()

  • Pingback: Código Konami en Javascript | Omeyas Web()