Created
April 23, 2018 18:45
-
-
Save jdgregson/0b1ab6e825996cbbb804a48ba35788b2 to your computer and use it in GitHub Desktop.
Causes a web page to flip out and wild emojis to appear.
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
let r = Math.random; | |
let fl = Math.floor; | |
let b = document.getElementsByTagName('body')[0]; | |
b.style.transition = 'all 1s ease-in-out'; | |
b.style.overflow = 'hidden'; | |
self.setInterval(() => { | |
let n = fl(r()*2); | |
let d = n?fl(r()*360):fl(r()*360)*-1; | |
let o1 = fl(r()*101)+1; | |
let o2 = fl(r()*101)+1; | |
let e1 = (fl(r()*15)+1).toString(16); | |
let e2 = (fl(r()*15)+1).toString(16); | |
let f = fl(r()*200)+1; | |
b.style.transform = `rotate(${d}deg) scale(${r()})`; | |
b.style.filter = `invert(${r()})`; | |
b.style.transformOrigin = `${o1}% ${o2}%`; | |
let e = document.createElement('p'); | |
e.innerHTML = `Ƕ${e1}${e2}`; | |
b.appendChild(e); | |
e.style = `position:absolute;top:${n?o1*2:o1*-2}%;left:${n?o2*2:o2*-2}%;font-size:${f}px`; | |
}, 1000); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment