var pmaWidgetInstance603f6635d9685ed27240136c = { debug: false, baseUrl: "https://public.pricemania.sk", exitLink: "https://www.pricemania.sk/exitv2/?data=03d2276f9ce9b71af8970664de7e5e4b:bc173cc331f0c2c7e1d29b5535457d92d7af5b60216e72c98d08113d7f4e5676511fce088b90813ab754dd1df785032a5403db1adbb2202271e8d67f9da4ab31f58f146655a2ca545ceeac06924ca1eaca43c2e7e3cc1ebe01f135b28195a76c180620677d9e771745cf332eee955fe0d88fed92997a8d272d068ab4e84650defb38ad18ce5f1c8ce33fde3a829d302ae70f87fae104638183262767cf9b43c1fa4c02d3b797a1163bd114785b7fe74f18f8e159e4b52261435ef54b92dcd995", shop_name: "profizoo.sk", shop_logo: "https://y1.sk/t/s/130x50/54095.jpg", product_price: "58,99 €", product_shipping: "5,96 €", product_availability: "", 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(){ pmaWidgetInstance603f6635d9685ed27240136c.initWidget("603f6635d9685ed27240136c"); }) function docReady(fn) { if (document.readyState === "complete" || document.readyState === "interactive") { setTimeout(fn, 1); } else { document.addEventListener("DOMContentLoaded", fn); } }