Skip to content

Lightweight Javascript manager for customiZable Konami codes

Notifications You must be signed in to change notification settings

fleebzz/Konamiz

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Konamiz

Lightweight Javascript manager for customiZable Konami codes : <1 Ko (minified)

How to add to your website ?

Always up to date

<script type="text/javascript" src="https://cdn.rawgit.com/FlorianBezagu/Konamiz/master/konamiz.min.js"></script>

Locally

Download konamiz.min.js

<script type="text/javascript" src="konamiz.min.js"></script>

How to use ?

When added to your website, create a new Konamiz as following :

  var k = new Konamiz()
          .onStart(function(){
            alert('Hello !');
          })
          .onStop(function(){
            alert('Bye !');
          });

Now enter the Konami code :
`Up, up, down, down, left, right, left, right, b, a, Enter`

How to customize ?

When creating your Konamiz you can give the constructor an Array with the Konamiz sequence you want such as :

  var k = new Konamiz([ 'h', 'e', 'l', 'l', 'o', 'Enter' ])
          .onStart(function(){
            alert('Hello !');
          })
          .onStop(function(){
            alert('Bye !');
          });

Now your Konamiz will be activated when typing
`h, e, l, l, o, Enter`

About

Lightweight Javascript manager for customiZable Konami codes

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages