Clean up cookie stuff

This commit is contained in:
swagg boi 2021-03-11 15:22:02 -05:00
parent d3d3f769e7
commit aa842d2cda
2 changed files with 10892 additions and 6 deletions

10881
public/js/jquery.js vendored Normal file

File diff suppressed because it is too large Load diff

View file

@ -7,15 +7,15 @@
<link rel="stylesheet" type="text/css" href="/css/swagg.css">
</head>
<body>
<!-- Import jQuery -->
<script src="/js/jquery.js"></script>
<script src="/js/jquery.cookie.js"></script>
<!-- Soundtrack -->
<!-- <embed> doesn't work anymore SAD
<embed src="/misc/Smashmouth_-_All_Star.mid" width="100%" height="60">-->
<audio id="soundtrack" src="/Music/Smashmouth-All-Star.mp3" preload="auto">
</audio>
<!-- "GDPR" banner -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js">
</script>
<script src="/js/jquery.cookie.js"></script>
<div id="gdpr">
<b>Notice:</b> This site uses kickass MIDI technology instead of cookies.
<img alt="a compact disc playing music" src="/Pictures/Music_CD.gif"
@ -27,15 +27,20 @@
<script>
function closeIt() {
document.getElementById("gdpr").style.display = "none";
document.cookie = "banner=clunk";
if ($.cookie("banner")) {
return;
} else {
document.cookie = "banner=seen";
}
}
function playIt() {
document.getElementById("soundtrack").play();
closeIt();
}
if ($.cookie('banner') === "clunk") {
document.getElementById("gdpr").style.display = "none";
if ($.cookie("banner") === "seen") {
closeIt();
}
</script>
<!-- Bonzi buddy -->