Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/jlengstorf/honkify

Set a goose loose on your site to be a jerk.
https://github.com/jlengstorf/honkify

Last synced: 17 days ago
JSON representation

Set a goose loose on your site to be a jerk.

Awesome Lists containing this project

README

        



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!](https://honkify.netlify.com)

## Praise for Honkify.js

> Nobody asked for this. – [Jessica Tremblay](https://twitter.com/poofichu/status/1179146980569878528)

> This is the worst thing you have ever done. – [E.J. Mason](https://twitter.com/codeability/status/1179136560110768128)

## 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:

```js
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](https://reactjs.org/docs/hooks-intro.html) (or React Honk?) to make any
event handler honkable

```js
import useHonk from 'honkify/useHonk';

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

function App() {
const honkify = useHonk();
const onClickHonkified = honkify(onClick);

return (

onClickHonkified(true)}>Sure, the header is honked too!


)
}

```

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