Skip to content
A JavaScript thing to add a konami (or something) code in your pages
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.eslintrc
.gitignore
README.md
index.html
konamize.js
package.json

README.md

konamize

intro

Easy konami code integration ! The function resets when the user type a bad key or when the timer reach its limit.

Click here for a demo !

how to

  • include konamize.js

Then, call the stuff:

konamize({
  callback: function() { alert('callback'); }
});

parameters

  • callback: the function to return
  • code: the code (default [38, 38, 40, 40, 37, 39, 37, 39, 66, 65])
  • timer: the timer limit (default: 5000)

license

This script is licensed under the terms of the WTF Public License (see here and here) :

            DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
                    Version 2, December 2004

 Copyright (C) 2004 Sam Hocevar 

 Everyone is permitted to copy and distribute verbatim or modified
 copies of this license document, and changing it is allowed as long
 as the name is changed.

            DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION

  0. You just DO WHAT THE FUCK YOU WANT TO.
You can’t perform that action at this time.