var pmaWidgetInstance605374fed9685ed272925037 = { debug: false, baseUrl: "https://public.pricemania.sk", exitLink: "https://www.pricemania.sk/exitv2/?data=aaa31fc9f8d6091bbc07cd6becdedbf0:cc9fbcfe06457124f5a4f6b567769f3ad27a2c2851bf1c8697f89032f761fb3cfa8a4dfcd310988439f151971e88b56166de18004329ff3c5a469ebdbadc9cb5e7081e9b5067cdcd40a222955d5e89d5835757c459794b850f0fad8f0fd3148f6299259538116d04670c56c68dd9b25d745653879823aab4192dcc873ad7b0aa06d0031d7195418d729af1226e87d22d3ca6a62cd369c6c235e458c5d372b2ad20c5f37caac7c9046cd3381143f9cf13bcf3ff7749f7f10d293ed68749d26b0472dbe8c49567d0d84a21b491c6d4fdaa", shop_name: "cykloabc.sk", shop_logo: "https://y1.sk/t/s/130x50/5842.jpg", product_price: "339,00 €", product_shipping: "0,00 €", 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(){ pmaWidgetInstance605374fed9685ed272925037.initWidget("605374fed9685ed272925037"); }) function docReady(fn) { if (document.readyState === "complete" || document.readyState === "interactive") { setTimeout(fn, 1); } else { document.addEventListener("DOMContentLoaded", fn); } }