Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Adds a special event named 'konami' to YUI 3
JavaScript
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
README
konami.html
konami.js

README

This YUI 3 module adds a new special event named 'konami'.  Based on the Konami code (http://en.wikipedia.org/wiki/Konami_Code), subscribers will be executed only once and should do something particularly awesome.  Think unicorns.

Typically, you'll want to subscribe to this event on the document, but it can be attached to any element that receives keydown events.

Y.on('konami', function (e) {
    
    MyApp._grantAllAccess(MyApp.getCurrentUser());

}, document);

or

Y.get('#scrollableArea').on('konami', function (e) {
    Y.later(3000, this, function (content) {
        this.setContent(content);
    }, this.get('innerHTML'));

    this.setContent("<strong>You're awesome!  Now get back to work.</strong>");
});
Something went wrong with that request. Please try again.