Skip to content

Instantly share code, notes, and snippets.

@mike-engel
Created July 2, 2017 06:14
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mike-engel/2eb2a78488e7470bdb0377f4387f8240 to your computer and use it in GitHub Desktop.
Save mike-engel/2eb2a78488e7470bdb0377f4387f8240 to your computer and use it in GitHub Desktop.
A stupid javascript function to bring chaos to any webpage
Array.prototype.slice.call(document.querySelectorAll('*')).forEach(el => {
el.style.position = 'fixed'
el.style.top = Math.random() * window.innerHeight + 'px'
el.style.left = Math.random() * window.innerWidth + 'px'
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment