Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 1,000,000+ packages pre-installed, including js-contra with all npm packages installed. Try it out:

js-contra lists no main file and has no index.js, so it can't be directly required. If this is a mistake, please let us know. It may however contain internal files that you can require manually:

// require("js-contra/[??]")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

js-contra v1.0.0

Javascript easter egg featuring the Konami Code (Contra)

js-contra

Javascript easter egg featuring the Konami Code (Contra)

This script will allow you to add an easter egg to your website. When a user on your site enters the Konami Code:

Up, Up, Down, Down, Left, Right, Left, Right, B, A

A Contra character will scroll across the screen and an audio sample will play.

A basic example can be found in the 'example' directory. There is also a minimized version that is slightly smaller than the full expanded source.

Both the animated GIF file, and the audio OGG file are encoded into the javascript using base64 for simplicity.

Feel free to fork this, or use it in any project you wish.

Installation

$ bower install js-contra

Usage

Simply add the following to your existing page.

<script type="text/javascript" src="src/contra.js"></script>

Checkout the Live Demo.

Feel free to contact me if you have any questions.

RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free