Witamy w nowym sklepie

Niebawem znajdziesz tu sklep internetowy zbudowany na IdoSell. Jaki będzie?

Wygodny, bezawaryjny oraz bardzo szybki
Nowoczesny i bezpieczny
Z błyskawiczną i tanią przesyłką
` : ''} ${that.createIdoSellLogo()} `; return template; }; this.setConsentMode = () => { const consentModeSnippet = document.querySelector('.google_consent_mode_update'); if (consentModeSnippet) { let adsStorageConsent = 'denied'; let analyticsStorageConsent = 'denied'; let adPersonalizationConsent = 'denied'; let adUserDataConsent = 'denied'; if (typeof this.cookieObj['marketing'] === 'boolean') { if (this.cookieObj['marketing'] === true) { adsStorageConsent = 'granted'; adPersonalizationConsent = 'granted'; adUserDataConsent = 'granted'; } } else { if (this.cookieObj['marketing']['googleads'] === true) { adsStorageConsent = 'granted'; adPersonalizationConsent = 'granted'; adUserDataConsent = 'granted'; } } if (typeof this.cookieObj['analytics'] === 'boolean') { if (this.cookieObj['analytics'] === true) { analyticsStorageConsent = 'granted'; } } else { if (this.cookieObj['analytics']['googleanalytics'] === true) { analyticsStorageConsent = 'granted'; } } let consentModeUpdate = document.createElement('script'); consentModeUpdate.setAttribute('class', 'google_consent_mode_update'); consentModeUpdate.innerHTML = "gtag('consent', 'update', {\n" + "'ad_storage': '" + adsStorageConsent + "',\n" + "'analytics_storage': '" + analyticsStorageConsent + "',\n" + "'ad_personalization': '" + adPersonalizationConsent + "',\n" + "'ad_user_data': '" + adUserDataConsent + "'\n" + '});'; consentModeSnippet.insertAdjacentElement('afterend', consentModeUpdate); consentModeSnippet.parentNode.removeChild(consentModeSnippet); } }; this.appendToBody = (template) => { document.querySelector('#iai_cookie') == null ? document.querySelector('body').insertAdjacentHTML('beforeend', template) : false; }; this.toggleBodyOverflow = (add = false) => { if (add) { document.querySelector('body').classList.add('--cookie-overflow'); } else { document.querySelector('body').classList.remove('--cookie-overflow'); } }; this.attachCookieStyles = (styles) => { const styleElement = document.createElement('style'); styleElement.innerHTML = styles; document.head.appendChild(styleElement); }; this.showCookieModal = () => { document.querySelector('#iai_cookie')?.classList?.remove('d-none'); }; this.toggleBottomVersion = () => { if (that.vars.shouldDisplayBottomVersion) { that.updateViewType(that.views.basic); } }; this.downloadMissingSnippets = async () => { if (!this.vars.canLoadAdditionalSnippets) { return true; } const formData = new FormData(); formData.append( "request", JSON.stringify({ Snippets: { format: "json", params: { mobile: (app_shop.vars.view == 1).toString(), tablet: (app_shop.vars.view == 2).toString(), pc: (app_shop.vars.view >= 3).toString(), request_uri: app_shop.vars.request_uri, additional_ajax: app_shop.vars.additional_ajax, consentAcceptedOnly: true, }, }, }) ); const snippetsData = await fetch("/ajax/get.php", { method: "POST", body: formData, }); const result = await snippetsData.json(); const snippets = result.Snippets.response.items; that.snippetsList = snippets; let head = document.querySelector("head"); let body = document.querySelector("body"); for (let key in snippets) { let div = document.createElement("div"); div.innerHTML = snippets[key].content; [...div.querySelectorAll("script")].forEach((script) => { let scr = document.createElement("script"); scr.text = script.textContent; script.replaceWith(scr); }); [...div.children].forEach((child) => { switch (snippets[key].region) { case "head": { head.appendChild(child); break; } case "body_top": { body.insertBefore(child, body.firstChild); break; } default: { body.appendChild(child); break; } } }); } return true; }; this.init = (showCookiesConfiguration = false) => { if (document.cookie.indexOf('ck_cook=shown') == -1 || showCookiesConfiguration) { that.toggleBottomVersion(); if (showCookiesConfiguration) { that.updateViewType(that.views.consents); that.showCookieModal(); } that.attachCookieStyles(cookieStyles); that.transformSummary(); that.checkIfAnySelected(that.vars.categories); that.appendToBody(that.createTemplate(that.vars.categories)); that.eventHandlers(); that.toggleBodyOverflow(true); } }; return this.init(); }; var newIaiCookie = new IaiCookies();