Konami_Mootools
Want to be like all the cool kids adding secret Konami codes to their website? Well now you can with Konami_Mootools. Konami_Mootools is a pretty simple Mootools class that fires an event after users enter the infamous Konami code and hit "enter".
Give it a try! Hit ↑, ↑, ↓, ↓, ←, →, ←, →, b, a, Enter.
How to Add it to Your Website
- Make sure you are using the latest version of Mootools.
- Download the Konami Mootools Class.
- Upload the downloaded file to your server.
- Add this code to your website:
<script type="text/javascript" src="konami_mootools.js"></script>
<script type="text/javascript">
konami = new Konami(function(){
// Do your Konomi code JS here.
alert('KONOMI!');
});
</script>
Documentation
new Konami(codeCalledFunction [, codeStepFunction [, codeMessedUpFunction]])
codeCalledFunction()
Required
A required function that will be called when the Konami code has been successfully completed.
codeStepFunction(step)
Optional
An optional function that will be called when a step of the Konami code is successfully completed.
codeMessedUpFunction
Optional
An optional function that will be called when the user messes up the code.
Thoughts? Questions? Concerns? Contact me at .