Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
cornify.js: konami code with rainbows and unicorns
// 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);
});
}
});
@scottstanfield

This comment has been minimized.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.