资源算法honkify

honkify

2020-02-17 | |  36 |   0 |   0

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 againunregister();

Hook

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

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


上一篇: YOLOv2_interpretation

下一篇:honktipbot

用户评价
全部评价

热门资源

  • seetafaceJNI

    项目介绍 基于中科院seetaface2进行封装的JAVA...

  • Keras-ResNeXt

    Keras ResNeXt Implementation of ResNeXt models...

  • spark-corenlp

    This package wraps Stanford CoreNLP annotators ...

  • shih-styletransfer

    shih-styletransfer Code from Style Transfer ...

  • inferno-boilerplate

    This is a very basic boilerplate example for pe...