A Funny jQuery Plugin To Enable The Konami Code On Your Website

File Size: 12.4KB
Views Total: 2360
Last Update:
Publish Date:
Official Website: Go to website
License: MIT
A Funny jQuery Plugin To Enable The Konami Code On Your Website

Konami Code is a simple and funny jQuery plugin that executes a specified callback function when the visitor types the famous 'Konami Code' or any other custom key sequences. Ideal for create an interesting and funny Easter Egg to your website.

How to use it:

1. Include the latest jQuery javascript library and jQuery konami code plugin on the website.

<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<script type="text/javascript" src="jQuery_konami_code.js"></script>

2. Call the plugin with default callback function (console.log() and alert()).

<script type="text/javascript">

3. Custom your own key sequence.

<script type="text/javascript">
mySequence: '49 50 51 52 53', // 1, 2, 3, 4, 5 
activeCode: 'mySequence'

Change log:


  • changing a global variable, executionCount, to private


  • adjusted to allow for configuration to accept and handle an alternate scope than the global window. Also arguements can be passed to the callback if needed.


  • security fix

This awesome jQuery plugin is developed by theInternauts. For more Advanced Usages, please check the demo page or visit the official website.