Skip to content

Instantly share code, notes, and snippets.

@jayzalowitz
Last active December 25, 2015 03:29
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jayzalowitz/6910569 to your computer and use it in GitHub Desktop.
Save jayzalowitz/6910569 to your computer and use it in GitHub Desktop.
Quite possibly my only real contribution to the world's happiness...
function humpday(){
if ((!$_COOKIE['cameled']) && (strftime("%A",time()) == "Wednesday")){
return '
<script type="text/javascript">
var date = new Date();
date.setTime(date.getTime() + (600000));
var expires = "; expires=" + date.toGMTString();
document.cookie = "cameled=yes" + expires + "; path=/";
</script>
<iframe width="560" height="315" src="//www.youtube.com/embed/Vs5QJi-dX-4?autoplay=1" frameborder="0" allowfullscreen></iframe>';
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment