Created
July 3, 2018 20:39
-
-
Save vkargov/6a81feee28d4002cfab8d9a6fb66bed5 to your computer and use it in GitHub Desktop.
make things funky
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for (let e of document.getElementsByTagName('*')) | |
{ | |
let rndc = () => Math.floor(Math.random()*255).toString() | |
let funkify = function(e) { | |
this.style.color="rgb(" + rndc() + ',' + rndc() + ',' + rndc()+")" | |
e.stopPropagation() | |
}.bind(e) | |
e.addEventListener('click', funkify) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment