mirror of
https://github.com/openvk/openvk
synced 2024-11-11 09:29:29 +03:00
35 lines
1,011 B
XML
35 lines
1,011 B
XML
|
<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() {
|
||
|
document.cookie = "cookiesAgreed=true";
|
||
|
u(".cookies-popup").nodes[0].style.display = "none";
|
||
|
}
|
||
|
</script>
|