Skip to content

Instantly share code, notes, and snippets.

@rocktronica
Created December 31, 2012 05:23
Show Gist options
  • Save rocktronica/4417526 to your computer and use it in GitHub Desktop.
Save rocktronica/4417526 to your computer and use it in GitHub Desktop.
Copy and paste into URL bar to help decide what to eat.
data:text/html,<style>body { text-align:center;font:100px/200px sans-serif;cursor:pointer}</style><body id="body">Click!<script>var choices = prompt("Choices", "Delivery, Ramen").split(","), choose = function() { body.innerHTML = choices[Math.floor(Math.random() * choices.length)]; }, choosing; body.addEventListener("click", function() { if (choosing) { clearInterval(choosing); choosing = undefined; } else { choosing = setInterval(choose, 25); } });</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment