2022-05-09 16:01:37 +03:00
|
|
|
<div class="cookies-popup" style="display: none;">
|
|
|
|
<div class="contanier">
|
|
|
|
<div class="text">
|
|
|
|
{tr("cookies_popup_content")|noescape}
|
|
|
|
</div>
|
|
|
|
<div class="buttons">
|
|
|
|
<a href="javascript:agreeWithCookies()" class="button">
|
|
|
|
{_cookies_popup_agree}
|
|
|
|
</a>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
let cookie = decodeURIComponent(document.cookie).split(";");
|
|
|
|
let cookiesAgreed = false;
|
|
|
|
for(let i = 0; i < cookie.length; i++) {
|
|
|
|
let c = cookie[i];
|
|
|
|
while (c.charAt(0) == ' ') {
|
|
|
|
c = c.substring(1);
|
|
|
|
}
|
|
|
|
if(c == "cookiesAgreed=true") {
|
|
|
|
cookiesAgreed = true;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if(!cookiesAgreed) {
|
|
|
|
u(".cookies-popup").nodes[0].style.display = "block";
|
|
|
|
}
|
|
|
|
|
|
|
|
function agreeWithCookies() {
|
2022-05-30 11:25:50 +03:00
|
|
|
let expires = (new Date(Date.now() + 40000000000)).toUTCString();
|
|
|
|
|
|
|
|
document.cookie = "cookiesAgreed=true;expires=" + expires + ";SameSite=Strict";
|
2022-05-09 16:01:37 +03:00
|
|
|
u(".cookies-popup").nodes[0].style.display = "none";
|
|
|
|
}
|
2022-05-30 11:25:50 +03:00
|
|
|
</script>
|