var pmaWidgetInstance614376a00067a2ef59857331 = { debug: false, baseUrl: "https://public.pricemania.sk", exitLink: "https://www.pricemania.sk/exitv2/?data=732b52d44d499ccff561ece772f8b518:84a47075df9a61159121e16a31441bfa25a63379cde4255133b1b98533f67c455d6c07db08ae8399dc8f55dc50e2c8b9359d698867562caa6921e860e926fc075c903f1f5ff284e87552a4d6f23b85a1d019d06d6b7e05a156e2af29e1960a7a530db8735c9aa1b14c35133d81005757f8a98582bb823a7640f6b39c3b837da5698c7ff5a5122c8991addc628b3b7a93c55f92c4b13bacc260ca2109f0243d8bdfed10dc8a9e3ba6eb9f692a13d27672aa53889c0851645ed968d5432ad5cc97", shop_name: "MobilPC.sk", shop_logo: "https://y1.sk/t/s/130x50/46049.jpg", product_price: "211,30 €", product_shipping: "3,90 €", 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(){ pmaWidgetInstance614376a00067a2ef59857331.initWidget("614376a00067a2ef59857331"); }) function docReady(fn) { if (document.readyState === "complete" || document.readyState === "interactive") { setTimeout(fn, 1); } else { document.addEventListener("DOMContentLoaded", fn); } }