Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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.
- Host: GitHub
- URL: https://github.com/jlengstorf/honkify
- Owner: jlengstorf
- Created: 2019-10-01T20:23:17.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2019-10-07T20:41:20.000Z (about 5 years ago)
- Last Synced: 2024-10-11T13:29:18.334Z (about 1 month ago)
- Language: JavaScript
- Homepage: https://honkify.netlify.com/
- Size: 17.6 KB
- Stars: 135
- Watchers: 2
- Forks: 9
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
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.