var pmaWidgetInstance6038efa8d9685ed27265bc79 = { debug: false, baseUrl: "https://public.pricemania.sk", exitLink: "https://www.pricemania.sk/exitv2/?data=dca11d4a397cb14431311c06d6e0d829:46ceed19183cd16b11b161e376ba4ef1338314a916b4147f936a3769664f6a8c80ef4387de2108ba0a0d723167946b1927efd0af341e4c7e0a14643231f0cffc8e1da24a642ada7e8235a466ad50e52e2714bf5669939261cc4b4891a66a4b810663b69f4dd64ff0f87eb0b7c55d9f5090cf488ad769317b0e4e610c5dc1236459442b2a63962af018b5d76324e2cc5906bb744701affe37de81edd4d834de6516da938c33003056e40714d41b0a1a6a83f174e6fec9e3f6c8a08311a6812b57", shop_name: "Extranaradie.sk", shop_logo: "https://y1.sk/t/s/130x50/6646.jpg", product_price: "95,00 €", product_shipping: "", 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(){ pmaWidgetInstance6038efa8d9685ed27265bc79.initWidget("6038efa8d9685ed27265bc79"); }) function docReady(fn) { if (document.readyState === "complete" || document.readyState === "interactive") { setTimeout(fn, 1); } else { document.addEventListener("DOMContentLoaded", fn); } }