function loadFonts() { WebFontConfig = { google: { families: [ "Roboto:400,300,500,700&display=swap", "Open Sans:300;400;700;600&display=swap", ], }, }; (function () { const wf = document.createElement("script"); wf.src = ("https:" == document.location.protocol ? "https" : "http") + "://ajax.googleapis.com/ajax/libs/webfont/1.6.26/webfont.js"; wf.type = "text/javascript"; wf.async = "true"; const s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(wf, s); document.body.classList.add("fonts-loaded"); })(); } // loadFonts(); function lazyLoadingImageHTML() { var lazyImages = [].slice.call(document.querySelectorAll("img.custom-lazy")); if ("IntersectionObserver" in window) { let lazyImageObserver = new IntersectionObserver(function ( entries, observer ) { entries.forEach(function (entry) { if (entry.isIntersecting) { let lazyImage = entry.target; lazyImage.src = lazyImage.dataset.customSrc; lazyImage.classList.remove("custom-lazy"); lazyImageObserver.unobserve(lazyImage); } }); }); lazyImages.forEach(function (lazyImage) { lazyImageObserver.observe(lazyImage); }); } else { // Possibly fall back to event handlers here } } function runFiframeIfInViewport() { var iframes = [].slice.call(document.querySelectorAll("fiframe")); if ("IntersectionObserver" in window) { let lazyImageObserver = new IntersectionObserver(function ( entries, observer ) { entries.forEach(function (entry) { if (entry.isIntersecting) { var iframe = document.createElement("iframe"); const target = entry.target; if (target.hasAttributes()) { for (var attributeKey in target.attributes) { if (target.attributes.hasOwnProperty(attributeKey)) { iframe[ target.attributes[ attributeKey ].name ] = target.attributes[ attributeKey ].value || true; } } } entry.target.replaceWith(iframe); } }); }); iframes.forEach(function (iframe) { lazyImageObserver.observe(iframe); }); } } lazyLoadingImageHTML(); loadFonts(); runFiframeIfInViewport(); Kasia Tusk | wLocie.pl setTimeout(function(){ acceptcsm(); }, 1000); function acceptcsm(){ const btn = document.querySelector('.fc-consent-root .fc-primary-button .fc-button-label'); if(!btn) return; btn.addEventListener('click', function(){ gtag("consent", "update", { ad_storage: "granted", ad_user_data: "granted", ad_personalization: "granted", analytics_storage: "granted", functionality_storage: "granted", personalization_storage: "granted", security_storage: "granted", wait_for_update: 2000, }); localStorage.setItem('csm', 'true'); }); } function sendcsm(){ if(localStorage.getItem('csm') === 'true'){ gtag("consent", "update", { ad_storage: "granted", ad_user_data: "granted", ad_personalization: "granted", analytics_storage: "granted", functionality_storage: "granted", personalization_storage: "granted", security_storage: "granted", wait_for_update: 2000, }); } } sendcsm();
Przejdź do treści

Tag: Kasia Tusk