Skip to content

stephenmathieson-boneyard/konami-code

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

konami-code

Execute a callback when the Konami Code is entered

Installation

Install with component(1):

$ component install stephenmathieson/konamicode

API

konamicode([element], fn)

Bind a keydown listener to element and invoke fn when the Konami Code is entered.

Example

var konami = require('konami-code');

// bind to the window
konami(function () {
  alert('hooray')
});

// bind to #foo
konami(document.getElementById('foo'), function () {
  alert('hooray');
});

License

MIT

About

Execute a callback when the Konami Code is entered

Resources

Stars

Watchers

Forks

Packages

No packages published