This Ember CLI Addon provides for the easy addition of easter eggs into an Ember application. It comes bundled with a collection of easter eggs to choose from, as well as you can specify your own. The specified easter egg is activated by the user entering the Konami code via their keyboard.
From http://zurb.com/playground/jquery-raptorize, this easter egg unleashes a Raptor of Jurassic proportions.
From http://kickassapp.com, this easter egg allows you to destroy DOM elements as if they were asteroids.
From http://creativejs.com/2012/07/fontbomb-blow-up-the-web/, this easter egg allows you to drop “bombs” on any site to blow the text to bits.
From http://kathack.com, this easter egg turns any page into Katamari Damacy.
From http://www.cornify.com/, this easter egg adds Unicorns and Rainbows to your page.
From https://nthitz.github.io/turndownforwhatjs/, this turns any website down for what
-
ember install:addon ember-konami
-
Make the following modifications to the Application Controller:
import Ember from 'ember';
import Konami from 'ember-konami/mixins/konami';
export default Ember.Controller.extend( Konami, {
});
The default easter egg is raptor
but if you wish for a different one to be activated after the Konami code is entered,
simply make the following modification:
import Ember from 'ember';
import Konami from 'ember-konami/mixins/konami';
export default Ember.Controller.extend( Konami, {
easterEgg: 'placeholder'
});
where the placeholder
text should be one of the following values, corresponding to the desired easter egg:
- raptor
- kickAss
- fontBomb
- katamariHack
- cornify
- turnDownForWhat
Instead of setting one of the values above in place of the placeholder
text, you can define a function to be executed
when the easter egg is activated. In this way you can trigger your own custom easter egg.
In order to activate the easter egg you only need to enter the Konami code using your keyboard. The Konami code consists of these keystrokes:
↑ ↑ ↓ ↓ ← → ← → B A Enter