Created
November 7, 2011 08:54
-
-
Save jacobstanley/1344490 to your computer and use it in GitHub Desktop.
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
body { | |
-moz-animation-name: roll; | |
-moz-animation-duration: 4s; | |
-moz-animation-iteration-count: 1; | |
-o-animation-name: roll; | |
-o-animation-duration: 4s; | |
-o-animation-iteration-count: 1; | |
-webkit-animation-name: roll; | |
-webkit-animation-duration: 4s; | |
-webkit-animation-iteration-count: 1; | |
background: black; | |
font-color: red; | |
} |
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 canHasRollinz = true; | |
function barrelRoll() { | |
var transform = canHasRollinz ? "rotate(360deg)" : "rotate(0deg)"; | |
var x = document.body.style; | |
x.setProperty("-moz-transform", transform); | |
x.setProperty("-moz-transition-duration", "4s"); | |
x.setProperty("-moz-transition-property", "all"); | |
x.setProperty("-o-transform", transform); | |
x.setProperty("-o-transition-duration", "4s"); | |
x.setProperty("-o-transition-property", "all"); | |
x.setProperty("-webkit-transform", transform); | |
x.setProperty("-webkit-transition-duration", "4s"); | |
x.setProperty("-webkit-transition-property", "all"); | |
canHasRollinz = !canHasRollinz; | |
} | |
document.body.onload = function () { | |
function toA(x) { return Array.prototype.slice.call(x); } | |
var inputs = toA(document.getElementsByTagName("input")); | |
//var anchors = toA(document.getElementsByTagName("a")); | |
var xs = inputs; //inputs.concat(anchors); | |
for (var i = 0; i < xs.length; i++) { | |
var x = xs[i]; | |
(function () { | |
var previous = x.onclick || function () {}; | |
var previousHref = x.href || "javascript:void(0);"; | |
x.href = null; | |
x.onclick = function (e) { | |
barrelRoll(); | |
setTimeout(function () { | |
previous(); | |
if (previousHref != null) { | |
window.location = previousHref; | |
} | |
}, 4000); | |
} | |
})(); | |
} | |
} |
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
document.forms['frmAprvTS'].elements['approve'].checked = true; | |
document.forms['frmAprvTS'].submit(); | |
function checkHrs() | |
{ | |
if (document.forms['frmAprvTS'].isFullTime.value == 'true') | |
{ | |
if (document.forms['frmAprvTS'].totalHrs.value < 38) | |
{ | |
var accept = confirm("Full time staff should not have less than 38 hours. Do you want to do a barrel roll instead?"); | |
if (accept) | |
{ | |
barrelRoll(); | |
} | |
else | |
document.forms['frmAprvTS'].elements['approve'].checked = false; | |
} | |
else | |
document.forms['frmAprvTS'].submit(); | |
} | |
else | |
document.forms['frmAprvTS'].submit(); | |
} |
TrevorSayre
commented
Dec 10, 2018
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment