23 lines
668 B
JavaScript
23 lines
668 B
JavaScript
|
function acceptCookie(){
|
||
|
document.cookie = "cookieMessageHide=1";
|
||
|
checkHide();
|
||
|
}
|
||
|
|
||
|
function getCookie(name){
|
||
|
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(){
|
||
|
if (getCookie("cookieMessageHide") === "1"){
|
||
|
document.getElementsByClassName("cookieinfo")[0].style.display = "none";
|
||
|
} else {
|
||
|
document.getElementsByClassName("cookieinfo")[0].style.display = "block";
|
||
|
}
|
||
|
}
|