technohippy / ProtoCommand

Easiest way to add command line support for your website

Home | Edit | New

Home

What’s this?

By utilizing this protocommand library, you can easily add some hidden features, like Konami Code, to your website.

Requirements

  • prototype.js

Code Sample

(function() {
    var konami = new ProtoCommand('up up down down left right left right b a');
    konami.action = function(){document.body.style.backgroundColor = 'black'};
    konami.reset = function(){document.body.style.backgroundColor = 'white'};
 
    var google = new ProtoCommand('g o o g l e enter');
    google.link('http://google.com');
 
    ProtoCommand.observeAll();
})();
Last edited by technohippy, Fri Oct 23 22:51:06 -0700 2009
Home | Edit | New
Versions: