kylebragger / konamicode

jQuery plugin that fires a custom callback if one types the Konami Code (or a custom code of your choice [via watchFor])

This URL has Read+Write access

kylebragger (author)
Mon May 11 18:06:47 -0700 2009
commit  a640e27c4d0200702fe8a72d98a01223ba8b9e43
tree    aac2775781d39d25aab87018d176541f8a95c004
parent  d5e16ea769a9b1fbfdb87b913037a680f4f18d5b
name age message
file README Loading commit data...
file konamicode.js
README
    jQuery Konami Code Plugin
    by Kyle Bragger <kyle@kylebragger.com>
    Created May 11, 2009
    Do with it what you will.

    Usage:
    
    $(document).ready(function(){
        $('body').upUpDownDown({
            watchFor: [38,38,40,40,37,39,37,39,66,65], // Array of keyCode and charCodes to watch for
                                                       // [38,38,40,40,37,39,37,39,66,65] == up up down down left right 
                                                       left right B A
            callback: function(){
                // Do some fancy shit here.
            }
        });
    });