2021-01-11 20:10:32 +01:00
|
|
|
function acceptCookie(){
|
|
|
|
document.cookie = "cookieMessageHide=1";
|
|
|
|
checkHide();
|
|
|
|
}
|
|
|
|
|
2021-01-11 20:13:12 +01:00
|
|
|
function getCookie(name:string){
|
2021-01-11 20:10:32 +01:00
|
|
|
var nameEQ = name + "=";
|
|
|
|
var ca = document.cookie.split(";");
|
|
|
|
for (var i=0; i < ca.length; i++) {
|
|
|
|
var c = ca[i];
|
|
|
|
while(c.charAt(0) === " ") c = c.substr(1, c.length);
|
|
|
|
if(c.indexOf(nameEQ) === 0) return c.substr(nameEQ.length, c.length)
|
|
|
|
}
|
|
|
|
return null
|
|
|
|
}
|
|
|
|
|
|
|
|
function checkHide(){
|
2021-01-11 20:13:12 +01:00
|
|
|
let cookieInfo: HTMLElement = <HTMLElement> document.getElementsByClassName("cookieinfo")[0];
|
2021-01-11 20:10:32 +01:00
|
|
|
if (getCookie("cookieMessageHide") === "1"){
|
2021-01-11 20:13:12 +01:00
|
|
|
cookieInfo.style.display = "none";
|
2021-01-11 20:10:32 +01:00
|
|
|
} else {
|
2021-01-11 20:13:12 +01:00
|
|
|
cookieInfo.style.display = "block";
|
2021-01-11 20:10:32 +01:00
|
|
|
}
|
|
|
|
}
|