Skip to content

Instantly share code, notes, and snippets.

View keybase.md

Keybase proof

I hereby claim:

  • I am mytolo on github.
  • I am mytolo (https://keybase.io/mytolo) on keybase.
  • I have a public key ASCiNR-8P0CbZv6xCrfO1f1SKWc-dsPykkUnwLwgC0b_eQo

To claim this, I am signing this object:

@Mytolo
Mytolo / paperclips.js
Created Dec 8, 2017 — forked from cowboy/paperclips.js
Universal Paperclips: stuff to paste into console http://www.decisionproblem.com/paperclips
View paperclips.js
_toggles = {}
makeToggle = (id, fn, delay = 250) => {
const elem = document.querySelector('#' + id)
elem.onclick = () => {
if (_toggles[id]) {
clearInterval(_toggles[id])
_toggles[id] = null
} else {
_toggles[id] = setInterval(() => elem.disabled || fn(), delay)
}