Skip to content

Instantly share code, notes, and snippets.

@scottstanfield
Created September 5, 2013 14:21

Revisions

  1. Scott Stanfield created this gist Sep 5, 2013.
    15 changes: 15 additions & 0 deletions cornify.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,15 @@
    // Modified to 'a a' instead of 'b a' due to vimium conflict
    // ▲ ▲ ▼ ▼ ◀ ▶ ◀ ▶ a a
    // example page: http://yckart.github.io/jquery.konami.js/
    //
    var kkeys = [], konami = "38,38,40,40,37,39,37,39,65,65";
    $(document).keydown(function(e) {
    kkeys.push( e.keyCode );
    if ( kkeys.toString().indexOf( konami ) >= 0 ){
    $(document).unbind('keydown',arguments.callee);
    $.getScript('http://www.cornify.com/js/cornify.js',function(){
    cornify_add();
    $(document).keydown(cornify_add);
    });
    }
    });