var pmaWidgetInstance609ccad80067a2ef595228b1 = { debug: false, baseUrl: "https://public.pricemania.sk", exitLink: "https://www.pricemania.sk/exitv2/?data=0cd3b8cbbf4e3f955d9323b63b68b9e2:51a25dfc6e625791c570b1351ec40085ad2560aecc942f82d58f349106ccb4a059d9b3e89168afe7860b4846d85c720950f89571b4fc754e5d22c594b49efa238e71a3d73dc4603f1a223db120e4a30fbbc70efbd11b01a1a7f8534cbccd41079006b0f6f54ab5434c57ba71f1f06976552dc7430509abac1bd13f1ec832cf276d64ce5a4405cbd2bb1711e87d5b38c64aab0247fd6e4391cc411a9956ce979586aed4b0655ed1dc93565eb5d7ca6d0d733d97fa9d9f9928dae4b9b8723143e0c6593eb7db1df43c1b2117d97ec46256", shop_name: "elu.sk", shop_logo: "https://y1.sk/t/s/130x50/59355.jpg", product_price: "249,49 €", 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(){ pmaWidgetInstance609ccad80067a2ef595228b1.initWidget("609ccad80067a2ef595228b1"); }) function docReady(fn) { if (document.readyState === "complete" || document.readyState === "interactive") { setTimeout(fn, 1); } else { document.addEventListener("DOMContentLoaded", fn); } }