Created
December 16, 2013 21:41
-
-
Save LemonPi/7994942 to your computer and use it in GitHub Desktop.
Import this if you want to be cool
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
var timer = setInterval(transform,50); | |
var degreez = 0; | |
var allSet = false; | |
var bellybutton; | |
function transform(){ | |
if (!allSet) { | |
var transOrigin = "50% 50%"; | |
document.body.parentElement.style.height = "100%"; | |
document.body.style.minHeight = "100%"; | |
document.body.style.transformOrigin = transOrigin; | |
document.body.style.webkitTransformOrigin = transOrigin; | |
document.body.style.mozTransformOrigin = transOrigin; | |
bellybutton = document.createElement("button"); | |
bellybutton.innerHTML = "CLICK TO STOP PUKING"; | |
bellybutton.style.position = "absolute"; | |
bellybutton.style.left = "45%"; | |
bellybutton.style.top = "45%"; | |
bellybutton.style.width = "10%"; | |
bellybutton.style.height = "10%"; | |
document.body.appendChild(bellybutton); | |
bellybutton.onclick = stoppuking; | |
allSet = true; | |
} | |
var transString = "rotate(" + degreez + "deg)"; | |
document.body.style.transform = transString; | |
document.body.style.webkitTransform = transString; | |
document.body.style.mozTransform = transString; | |
degreez += 1; | |
} | |
function stoppuking(){ | |
clearInterval(timer); | |
var transString = ""; | |
document.body.style.transform = transString; | |
document.body.style.webkitTransform = transString; | |
document.body.style.mozTransform = transString; | |
document.body.removeChild(bellybutton); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment