My April Fools Day Prank
Slipped this into my application sometime last week. Wonder when my users will notice.
$(document).keyup(function() {
if(itIsAprilFoolsDay())
$("#strobie").css("background-color", getRandomColor());
});
function getRandomColor() {
var random = Math.round(0xffffff * Math.random());
return ('#0' + random.toString(16)).replace(/^#0([0-9a-f]{6})$/i, '#$1');
}
function itIsAprilFoolsDay() {
var today = new Date();
return today.getMonth() == 3 && today.getDate() == 1;
}