renanvalentin / funnies

:stuck_out_tongue_winking_eye: Make users laugh when your app loads.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Funnies: Turn "Please Wait" into a smile.

Travis build status Dependency Status devDependency Status

Usage

import Funnies from 'funnies';
let funnies = new Funnies();
funnies.message(); // "Reticulating Splines..."
funnies.message(); // "Generating witty dialog..."
funnies.message(); // "Go ahead -- hold your breath!"

React Component

React rendering

import {FunniesComponent} from 'funnies';
ReactDOM.render(<FunniesComponent />, node);
ReactDOM.render(<FunniesComponent interval={1000} />, node); // a new message every second
ReactDOM.render(<FunniesComponent customMessages={["You're too funny", "Thinking really hard..."]} />, node); // Add a few of your own messages

jQuery

Odan wrote a great jQuery plugin for Funnies!

import $ from 'jquery';
// (include js/jquery.funnies.js)

$('element').funnies();

Troubleshooting/FAQ

  • Does this work in both the client and server-side?

    Yes. Either include funnies.min.js within your page and use window.Funnies, or use node/browserify/webpack to require the module.

  • Can I return a funny message within preformatted HTML?*

    Yes, try funnies.messageHTML().

  • I want to add a funny message!

    Create a fork, add your message to src/funnies.js, then create a pull request.

  • Something isn't working properly.

    • Send me a tweet @rgausnet and I'll help you out asap.
    • Use Github's issue tracker.

Areas to improve

  • Angular bindings would be great.

About

:stuck_out_tongue_winking_eye: Make users laugh when your app loads.

License:MIT License


Languages

Language:JavaScript 100.0%