Web/scripts/cookies.js
2018-12-30 16:38:14 +01:00

13 lines
No EOL
674 B
JavaScript

if (cookieNotification) {
let notif = "";
notif += '<div class="alert alert-danger alert-dismissible fade show" role="alert">';
notif += "This site uses <strong>cookies</strong> for the dark mode toggle. It only tracks if you have the dark mode enabled or not, and if you've dismissed this information before, so there's really not much else to say. Have a nice day!";
notif += '<button type="button" class="close" data-dismiss="alert" id="notif-close">';
notif += '<span>&times;</span>';
notif += '</button></div>';
document.write(notif);
$("#notif-close").on("click", function () {
setCookie("notification", "true", 365);
});
}