I hereby claim:
- I am alexrussell on github.
- I am alexrussell (https://keybase.io/alexrussell) on keybase.
- I have a public key ASDAHeM-gBzZH8uAGNY7UfaVDFtzZOW4KwN638NNVTu9oQo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
export default function OutsideEventListener(Target, listeners = []) { | |
return class OutsideEventListener extends Component { | |
target = null | |
componentDidMount() { | |
for (const eventName of listeners) { | |
window.addEventListener(eventName, this.handleEvent, false) | |
} | |
} |
javascript:(function(){var els = document.querySelectorAll('p'), df, quotes=['I reckon that','My mate told me','I heard in the pub that','My mum told me','My nana always said that','According to the Daily Mail,','Common sense dictates that','Some people say','Apparently,','I read on Wikipedia that']; for (var element in els) { df = document.createElement('span'); df.innerHTML = quotes[Math.floor(Math.random() * quotes.length)] + ' '; els[element].insertBefore(df, els[element].childNodes[0]); };})(); |