var pmaWidgetInstance63e4e52c4218328905402abb = { debug: false, baseUrl: "https://public.pricemania.sk", exitLink: "https://www.pricemania.sk/exitv2/?data=7f36bd8dd527832019ebc4d37699fc5c:86d88b0b4c5b7afd1acc46eaf6c5ba1b31faf52b509b7fa223cbdf727a2ba264eb644be7caeb78f9c65fa063e9cdf2aefeeb0d677b8ad20897e4443b3dd6f6a33fb76ec497e416636e1edf9122040ca43441ce86a5aa18da42b4aef51982c4bdc4de5a5f344f36d5427f6d02e22882606051a0346ad9348418bd1898eddc98b71f778815a536a2bbcca985d29d39020132c62385b54e7d85f299f4a71472b1544431a620a82ff9c1423aca023ac39f3347f669edfefbe63b5df9373ec031cccedad6eb08949be65520bb5b973cdd5343", shop_name: "klarstein.sk", shop_logo: "https://y1.sk/t/s/130x50/52719.jpg", product_price: "395,90 €", product_shipping: "0,00 €", product_availability: "Skladom", initWidget: function(widgetId){ this.insertLinkToButton(widgetId); }, insertLinkToButton: function(widgetId){ const instance = this; const btns = this.findButtonWidgets(widgetId); for(var btn of btns){ instance.insertButtonVariables(btn); if(btn.tagName == "A"){ btn.href = this.exitLink; btn.target = "_blank"; btn.rel = "nofollow"; } else { btn.onclick = function(event){ event.stopPropagation(); window.open(instance.exitLink); } } } }, findButtonWidgets: function(widgetId){ var currentModalButtons = []; var modalButtons = document.getElementsByClassName(`pma-widget`); for(var modalButton of modalButtons){ if(modalButton.getAttribute('data-id') == widgetId){ currentModalButtons.push(modalButton); } } return currentModalButtons; }, insertButtonVariables: function(element){ element.innerHTML = element.innerHTML.replaceAll("{{shop_name}}",this.shop_name?this.shop_name:""); element.innerHTML = element.innerHTML.replaceAll("{{shop_logo}}",this.shop_logo?this.shop_logo:""); element.innerHTML = element.innerHTML.replaceAll("{{product_price}}",this.product_price?this.product_price:""); element.innerHTML = element.innerHTML.replaceAll("{{product_shipping}}",this.product_shipping?this.product_shipping:""); element.innerHTML = element.innerHTML.replaceAll("{{product_availability}}",this.product_availability?this.product_availability:""); } } docReady(function(){ pmaWidgetInstance63e4e52c4218328905402abb.initWidget("63e4e52c4218328905402abb"); }) function docReady(fn) { if (document.readyState === "complete" || document.readyState === "interactive") { setTimeout(fn, 1); } else { document.addEventListener("DOMContentLoaded", fn); } }