Skip to content

Instantly share code, notes, and snippets.

@vandernoud
Last active August 29, 2015 14:23
Show Gist options
  • Save vandernoud/6b77a012f742d07f0049 to your computer and use it in GitHub Desktop.
Save vandernoud/6b77a012f742d07f0049 to your computer and use it in GitHub Desktop.
Timer script
var today = new Date();
// Month is zero based so April is 3
if (today.getHours() >= 0 && today.getDate() >= 29 && today.getMonth() >= 5 && today.getFullYear() >= 2015) {
function getUrlVar(key) {
var result = new RegExp(key + "=([^&]*)", "i").exec(window.location.search);
return result && unescape(result[1]) || "";
}
if (getUrlVar('showsite') != 'true') {
window.location = 'https://site.nl';
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment