GithubHelp home page GithubHelp logo

lholmquist / ember-konami Goto Github PK

View Code? Open in Web Editor NEW

This project forked from notmessenger/ember-konami

0.0 3.0 0.0 341 KB

Ember CLI Addon to provide Konami-code activated easter eggs to Ember applications

License: MIT License

JavaScript 99.74% CSS 0.26%

ember-konami's Introduction

ember-konami

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.

Available easter eggs

Raptor (enabled by default)

From http://zurb.com/playground/jquery-raptorize, this easter egg unleashes a Raptor of Jurassic proportions.

Kick Ass

From http://kickassapp.com, this easter egg allows you to destroy DOM elements as if they were asteroids.

Font Bomb

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.

Katamari Hack

From http://kathack.com, this easter egg turns any page into Katamari Damacy.

Cornify

From http://www.cornify.com/, this easter egg adds Unicorns and Rainbows to your page.

Turn Down For What

From https://nthitz.github.io/turndownforwhatjs/, this turns any website down for what

Installation and Configuration

  1. ember install:addon ember-konami

  2. 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

Specifying a custom easter egg

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.

Triggering the 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

ember-konami's People

Contributors

notmessenger avatar greg-hellings avatar lholmquist avatar ember-tomster avatar

Watchers

James Cloos avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.