Skip to content

Instantly share code, notes, and snippets.

@scottsheffield
Created November 12, 2013 19:32
Show Gist options
  • Save scottsheffield/7437238 to your computer and use it in GitHub Desktop.
Save scottsheffield/7437238 to your computer and use it in GitHub Desktop.
Instant Dance Party on most webpages.
javascript:(function()%7Bvar body%3Ddocument.getElementsByTagName(%27body%27)%5B0%5D,prevBackground%3Dbody.style.background,audio%3Ddocument.createElement(%27audio%27),strobeMe%3Bfunction ohGodItsKickingIn()%7Baudio.play()%3BsetTimeout(function()%7BstrobeMe%3DsetInterval(function()%7Bvar strobeColor%3D%27rgb(%27%2BMath.floor(Math.random()*155%2B100)%2B%27,%27%2BMath.floor(Math.random()*155%2B100)%2B%27,%27%2BMath.floor(Math.random()*155%2B100)%2B%27)%27%3Bbody.style.background%3DstrobeColor%3Bwindow.body.style.background%3DstrobeColor%3B%7D,1)%7D,4050)%3BsetTimeout(function()%7BclearInterval(strobeMe)%3Bbody.style.background%3DprevBackground%3B%7D,106000)%3B%7Daudio.addEventListener(%27loadedmetadata%27,ohGodItsKickingIn,false)%3Bbody.appendChild(audio)%3Baudio.src%3D"http://georgeandjonathan.com/thebestmusic/mp3/5.mp3"%3B%7D)()%3B
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment