Wczytuję dane...

Dame

Sortuj według:
Wyświetl po produktów
fetch("/ajax/info/cookie_banner/", { method: "POST", body: JSON.stringify({}), headers: { "Content-Type": "application/json" } }) .then(response => response.text()) .then(data => { if (data.length > 10) { var div = document.createElement("div"); document.getElementById("wrapper").append(div); div.innerHTML = data; if (document.querySelector("#cookie.cookiesSet")) { document.body.addEventListener("click", function (e) { if (e.target == document.querySelector(".cookie-shadow")) { document.querySelector("#cookie").classList.remove("active"); document.querySelector(".cookie-side").classList.remove("active"); } }); } document.querySelector("#cookies-new .cookie-settings").addEventListener("click", function () { document.querySelector("#cookie").classList.toggle("active"); document.querySelector(".cookie-side").classList.toggle("active"); document.querySelector("#marketing-cookies-bar").classList.toggle("active"); if(document.querySelector(".details")) { document.querySelector(".details").classList.remove("active"); document.querySelector(".consent").classList.add("active"); document.querySelector(".acceptSelected").classList.add("hidden"); document.querySelector(".personalize").classList.remove("hidden"); document.querySelector(".cookie-wrap").classList.add("hidden"); document.querySelector(".obligatory-description").classList.remove("hidden"); } }); if (document.getElementById("show_required_cookies")) { var required_div = document.getElementById("required_cookies"); document.getElementById("show_required_cookies").addEventListener("click", function () { if (required_div.style.display == "none") { required_div.style.display = ""; } else { required_div.style.display = "none"; } }); var optional_div = document.getElementById("optional_cookies"); document.getElementById("show_optional_cookies").addEventListener("click", function () { if (optional_div.style.display == "none") { optional_div.style.display = ""; } else { optional_div.style.display = "none"; } }); } } }) .catch(err => console.log(err));