Skip to content
Simple system for detecting the entry of the famous Konami code and attaching an event
JavaScript HTML
Find file
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
README.md
example.html
index.js
konami.js
package.json

README.md

konami-js

Simple system for detecting the entry of the famous Konami code and attaching an event

Simple Example:

(function() {
  var konami = new Konami();
  konami.onSuccess = function () {
    alert('You win!');
  };
  konami.init();
}());

Example with specific target:

(function() {
  var konami = new Konami();
  konami.onSuccess = function () {
    alert('You win!');
  };
  konami.listenerTarget = document.getElementById('my_element');
  konami.init();
}());
Something went wrong with that request. Please try again.