var pmaWidgetInstance603e4172d9685ed272630019 = { debug: false, baseUrl: "https://public.pricemania.sk", exitLink: "https://www.pricemania.sk/exitv2/?data=942c69df508b86c9c7923cceb840afdb:4eea263bd621fe06dc147c2c1d1fa7af06eae704d6ff1f2170aae22a3e840791cceeb61d5931ec40885816aca38fa5d50a7b490a06ba7be88a28d851be7de6bafddc21b82ba35cd0d67d98e85655985a9b2159c8b80a350cfaf03e59e26edadff652e42c8fdc6cacfbdd6b7167a6a201a8ce137e01dc796d6e01c6ed8bed7e156105da8401a62ea8c233ed2433b58e6a2a944e1da06d3bdd8f3dfe9c7df84d05651b75fe58a99d9ab996fe9d413a18e38d88e2994730900ec434f02ca6cdf982", shop_name: "bux.sk", shop_logo: "https://y1.sk/t/s/130x50/528.jpg", product_price: "3,90 €", product_shipping: "", 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(){ pmaWidgetInstance603e4172d9685ed272630019.initWidget("603e4172d9685ed272630019"); }) function docReady(fn) { if (document.readyState === "complete" || document.readyState === "interactive") { setTimeout(fn, 1); } else { document.addEventListener("DOMContentLoaded", fn); } }