var pmaWidgetInstance5fed624fd9685ed27286368e = { debug: false, baseUrl: "https://public.pricemania.sk", exitLink: "https://www.pricemania.sk/exitv2/?data=01d043f6e95ee6b93455d38658060237:5fdbc1adf01a7f1931e83b20fe4f1de02b11bfd97680981b436832f78ccc4e55eb805a96f2d998ab80ec105f7d5240f3ea425aefe477fb8aa9afd76872cbc5d3aa49e993910cd5531234ab465dfd7016ea9c959a5bb5fe8a5e5292ca69f2379592dd4c94b5184c8542dc6d9323d025d5174129a7befdae849adb4aff4ce0eff7294a3b93ae21a67b170ca00ff4d24028ee49da3f713f1894f2d1c6a8b256defc4236132f912dc7085931306632cfaf98f7718deb306bfb1c217d6cdf321383936e9f2840c791777b441d04096fef18a6", shop_name: "predomyazahrady.sk", shop_logo: "https://y1.sk/t/s/130x50/47035.jpg", product_price: "363,03 €", 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(){ pmaWidgetInstance5fed624fd9685ed27286368e.initWidget("5fed624fd9685ed27286368e"); }) function docReady(fn) { if (document.readyState === "complete" || document.readyState === "interactive") { setTimeout(fn, 1); } else { document.addEventListener("DOMContentLoaded", fn); } }