honkify

0.2.0 • Public • Published

Honkify.js

Honkify.js

Need a little more chaos in your life? Set a goose loose on your site to act like a jerk.

Try a demo!

Praise for Honkify.js

Nobody asked for this. – Jessica Tremblay

This is the worst thing you have ever done. – E.J. Mason

What does Honkify do?

When activated, all links and buttons on the site will stop working, instead triggering a “honk!” sound effect.

This is not transpiled and not tested on any browsers except Chrome latest, because this is a silly joke and therefore honk honk honk!

Installation and Quick Start

yarn add honkify

In your code:

import honkify from 'honkify';

// The goose is loose!
const unregister = honkify();

// Disable so links work again
unregister();

Hook

You can also use the handy React Hook (or React Honk?) to make any event handler honkable

import useHonk from 'honkify/useHonk';

function onClick = (isLoose) => {
  console.log(`goose is ${isLoose ? 'loose' : 'STILL LOOSE'}`);
}

function App() {
  const honkify = useHonk();
  const onClickHonkified = honkify(onClick);
  
  return (
    <h1 onClick={() => onClickHonkified(true)}>Sure, the header is honked too!</h1>
  )
}

Disclaimer: please don’t actually use this.

Or, if you do, make sure it’s easy to toggle off. Geese may be jerks, but developers shouldn’t be.

Readme

Keywords

none

Package Sidebar

Install

npm i honkify

Weekly Downloads

0

Version

0.2.0

License

MIT

Unpacked Size

4.26 kB

Total Files

4

Last publish

Collaborators

  • jlengstorf