Skip to content

Instantly share code, notes, and snippets.

@LemonPi
Created December 16, 2013 21:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save LemonPi/7994942 to your computer and use it in GitHub Desktop.
Save LemonPi/7994942 to your computer and use it in GitHub Desktop.
Import this if you want to be cool
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