Last active
June 27, 2018 18:02
-
-
Save n8/d41cc265f8420655612f6664c76f46b6 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
<div id='myAlert' style="background: #000; font-size: 2rem; color: #fff; padding: 2rem; display:none; line-height: 2.5rem"> | |
<a href="#" style="float: right; color: #fff; text-decoration: none" onclick="hideAlert()">×</a> | |
We'll be offline at 9:00PM Central June 22 for database maintance. It should take 60 minutes at most. | |
</div> | |
<script> | |
var alertVersion = '06212018.r7'; | |
function hideAlert(){ | |
var child = document.getElementById("myAlert"); | |
child.parentNode.removeChild(child); | |
document.cookie = "sawNotice=" + alertVersion + ";path=/;expires=Fri, 31 Dec 9999 23:59:59 GMT"; | |
} | |
if (document.cookie.split(';').filter(function(item) { | |
return item.indexOf("sawNotice=" + alertVersion) >= 0; | |
}).length == 0) { | |
document.getElementById("myAlert").style.display = "block"; | |
} | |
</script> |
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 alertVersion = '06212018.r6'; | |
function hideAlert(){ | |
var child = document.getElementById("myAlert"); | |
child.parentNode.removeChild(child); | |
document.cookie = "sawNotice=" + alertVersion + ";path=/;expires=Fri, 31 Dec 9999 23:59:59 GMT"; | |
} |
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
<a href="#" style="float: right; color: #fff; text-decoration: none" onclick="hideAlert()">×</a> |
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
if (document.cookie.split(';').filter(function(item) { | |
return item.indexOf("sawNotice=" + alertVersion) >= 0; | |
}).length == 0) { | |
document.getElementById("myAlert").style.display = "block"; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment