Web/scripts/cookieinfo.js

15 lines
672 B
JavaScript
Raw Normal View History

2020-04-02 22:14:53 +02:00
if (getCookie("notification") !== "true") {
let notif = "";
notif += '<div class="alert alert-danger alert-dismissible fade show" role="alert">';
notif += "This site uses cookies to store information about your browsing activity.";
notif += "<br>For more information, check out the <a href=\"/#privacy\">privacy policy</a>.";
2020-04-02 22:14:53 +02:00
notif += "<br>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);
});
}