Clean up cookie stuff

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