Konami code
What is the Konami code:
The Konami Code, known in Japan as the Konami Command (Konami Komando), is a cheat code that appears in many Konami video games, although the code also appears in some non-Konami games. The code was first used in the 1986 release of Gradius for the Nintendo Entertainment System but was made famous in North America in the NES version of Contra, for which it was also dubbed the “30 Lives Code”. While pausing the game or during the title screen, the player could press the following sequence of buttons (followed by the start button) on the game controller: ↑ ↑ ↓ ↓ ← → ← → B A
(Via wiki article.)
.
.
.What can the Konami code be used for on the web:
…Well, um what use does it have on the web, other the shits and giggles?
Well, how else can you hide code that only runs when you want it too (e.g testing code )
… a button?
Yeah, But doesn’t that mean its not hidden?
… Touche!
.
.
.
The Code:
<script type="text/javascript">
if ( window.addEventListener ) {
var kkeys = [], konami = "38,38,40,40,37,39,37,39,66,65";
window.addEventListener("keydown", function(e){
kkeys.push( e.keyCode );
if ( kkeys.toString().indexOf( konami ) >= 0 )
{
// do stuff here when activated
kkeys = [];
}
}, true);
}
</script>
.
.
.
.
.
Sites ive used the Konami code in:
http://www.revoltproductions.com/
.
. Find other site that use Konami Code:
.
.




