console.log('Gruezi:' , res.detected_values.country.name); function transcyUpdateCurrency() { var count = 0, stepDone = 0; var transcyCustomInterval = setInterval(() => { if (count > 5) { clearInterval(transcyCustomInterval); } count++; if (document.getElementsByClassName('product__price').length > 0) { [].forEach.call(document.querySelectorAll('.money'), function (e) { if (!e.className.includes('transcy-money')) { e.classList.add('transcy-money') } }); stepDone++; clearInterval(transcyCustomInterval); } if (stepDone > 0) { _transcy.methods.convertCurrency(); } }, 500); } document.addEventListener("DOMContentLoaded", function () { document.querySelector(".social .social-links .social-link.facebook").href = "https://www.facebook.com/ellance.ch"; var docLanguage = document.documentElement.lang == "en"?"/en":""; //Newsletter if(document.querySelector("html[lang='en'] input#pxs-newsletter-form-email")){ document.querySelector("html[lang='en'] input#pxs-newsletter-form-email").placeholder = "E-mail address" } //Sidebar cart document.querySelector("button.mini-cart-wrap.mini-cart-wrap--no-js-hidden").onclick = function(){ if(document.querySelector("html[lang='en'] .sidebar-drawer__header")){ document.querySelector("html[lang='en'] .sidebar-drawer__header").innerHTML = "Your cart" } if(document.querySelector("html[lang='en'] button.cart-mini-actions__checkout-button.action-button.submit-button")){ document.querySelector("html[lang='en'] button.cart-mini-actions__checkout-button.action-button.submit-button").innerHTML = "Checkout" } } // if(document.querySelector("html[lang='en'] button.action-button.cart-submit span")){ document.querySelector("html[lang='en'] button.action-button.cart-submit").value = "Checkout" document.querySelector("html[lang='en'] button.action-button.cart-submit span").innerHTML = "Checkout" } //Contact if(document.querySelector("html[lang='de'] input[name='contact[email]']")){ document.querySelector("html[lang='de'] input[name='contact[email]']").placeholder = "Ihre@email.com" } if(document.querySelector("section.home-section.content-area.has-heading.has-border h2.section-title")){ var htmlContent = document.querySelector("section.home-section.content-area.has-heading.has-border h2.section-title").innerHTML document.querySelector("section.home-section.content-area.has-heading.has-border h2.section-title").innerHTML = ""+htmlContent+""; } // if(document.querySelector("#shopify-section-template--14702244331657__1646305518b2e89777 h2")){ var originalTitle = document.querySelector("#shopify-section-template--14702244331657__1646305518b2e89777 h2").innerHTML document.querySelector("#shopify-section-template--14702244331657__1646305518b2e89777 h2").innerHTML = ""+originalTitle+"" } if(document.querySelector("#shopify-section-template--14702244266121__9c12d24f-2144-417d-a115-cd4a4e49375c h2")){ var originalTitle = document.querySelector("#shopify-section-template--14702244266121__9c12d24f-2144-417d-a115-cd4a4e49375c h2").innerHTML document.querySelector("#shopify-section-template--14702244266121__9c12d24f-2144-417d-a115-cd4a4e49375c h2").innerHTML = ""+originalTitle+"" } setTimeout(() => { transcyUpdateCurrency(); if(document.querySelector("#shopify-section-template--14702244462729__main .otp_button-submit")){ document.querySelectorAll("#shopify-section-template--14702244462729__main .otp_button-submit").forEach(function(el){ if(el.value == "find order"){ el.value = "Find order" } }) } }, 3000); if(document.getElementById("dummy-chat-button-iframe") !== null){ document.getElementById("dummy-chat-button-iframe").title = "Chat bot"; } //Language switcher if(document.querySelector("img.transcy-flag") !== null){ document.querySelector("img.transcy-flag").setAttribute("alt","Selected Language") } });