Jquery plugin to create easter eggs in your apps in a very simple way by Francisco Gonzalez
This allow to set a word to type that will trigger the custom function. For this to work you need to include the Jquery library
<script src="http://code.jquery.com/jquery-2.1.3.min.js"></script>
Francisco Gonzalez, Jorge Rodriguez
In your javascript, just add the lines:
var easter = $(window).eastereggs();
easter.addEgg('magicword', function(){
// Do something
});
easter.init();
You can add as many as you want, using a string or a array of charcodes:
var easter = $(window).eastereggs();
easter.addEgg('magicword', function(){
// Do something
});
easter.addEgg([68,69,77,79], function(){
// Do something 2
});
easter.init();
By default we added the KONAMI (up, up, down, down, left, right, left, right, b, a, b, a) code and it's very easy to use:
var easter = $(window).eastereggs();
easter.setKonami(function(){
// Do something
});
easter.init();
Copyright (C) 2015 Francisco Gonzalez
Licensed under the MIT license.