Fork me on GitHub

Konami-Unicorn-Blitz by jmhobbs

Usage | Configuration | Extensions | License | Authors


Try out the Konami code on this page. Right Now.

UP-UP-DOWN-DOWN-LEFT-RIGHT-LEFT-RIGHT-B-A


Screenshot

UNICORNS

Usage

Adding this to your page is easy, just insert the following code above your </body> tag.

<script type="text/javascript" src="https://cdn.rawgit.com/jmhobbs/Konami-Unicorn-Blitz/master/konami-unicorn-blitz.min.js"></script>

Or, if you are a jQuery user you can use the jQuery version that Eric Ryan Harrison created.

<script type="text/javascript" src="https://cdn.rawgit.com/jmhobbs/Konami-Unicorn-Blitz/master/jQuery.konami-unicorn-blitz.min.js"></script>

Configuration Options

Want to get fancy? Here are some configuration options you can set, along with their defaults.

// Set this to whatever path (relative or absolute) where your images are stored.
Konami.imagePath = 'http://github.com/jmhobbs/Konami-Unicorn-Blitz/raw/master/';
// You need to have all of your images in the same format, numbered starting at 1
Konami.imageCount = 4;
Konami.imageFormat = '.gif';
// How many unicorns (or whatever) do you want to spam them with?
Konami.unicornCount = 50;
// What do you want the text on top to be?
Konami.words = 'UNICORNS';
// If you want to auto hide the unicorns after some time (in milliseconds).  <= 0 means never.
Konami.hideAfter = 0;
// Each image will have the id of this prefix, plus the iteration number appended
Konami.idPrefix = 'konami_';
// All of the images will be given this class
Konami.className = 'konami_code';


Want it on every page?

You really love unicorns, right? Then take them with you anywhere!

Try out the Chrome Extension or the Greasemonkey Script


License

Copyright (c) 2010 John Hobbs

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

Authors

John Hobbs
Eric Ryan Harrison
Eric Schoonover

Download

You can download this project in either zip or tar formats.

You can also clone the project with Git by running:

$ git clone git://github.com/jmhobbs/Konami-Unicorn-Blitz

Looking for a more "robust" solution?

Check out http://github.com/kylebragger/konamicode for a jQuery plugin that will let you do anything you want.