Created
December 14, 2012 09:49
-
-
Save Patrizio/4284168 to your computer and use it in GitHub Desktop.
Removed the go_to-variable
This file contains hidden or 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
<script type="text/javascript" language="JavaScript"> | |
// page to go to if cookie exists | |
num_days = 30; | |
function ged(noDays){ | |
var today = new Date(); | |
var expr = new Date(today.getTime() + noDays*24*60*60*1000); | |
return expr.toGMTString(); | |
} | |
function readCookie(cookieName){ | |
var start = document.cookie.indexOf(cookieName); | |
if (start == -1){ | |
document.cookie = "seenit=yes; expires=" + ged(num_days); | |
} else { | |
HideContent('survey_holder'); | |
} | |
} | |
readCookie("seenit"); | |
function HideContent(d) { | |
if(d.length < 1) { return; } | |
document.getElementById(d).style.display = "none"; | |
} | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment