var pmaWidgetInstance613ef2220067a2ef599fc578 = { debug: false, baseUrl: "https://public.pricemania.sk", exitLink: "https://www.pricemania.sk/exitv2/?data=22070547b68cc7fadea7d5a85e6102c8:744412c92771de6c639400d4e0d57e5716e4b3f8775890faf65db5cbe2c59ae2ad352060566d4d1b73332b5a919efb9ab303872bf900536808dcead3deefa8d10a14cc095bca731ff9029ff76a2175d4d2d7b28452badb6976d36272da3e6a15118ca98510afa5113c6527599631b0ab5829be59abe27a1ffb7db85e7c5c67ff21e352383f625b9802aa8d8a7b46ab6a49afb81ea8f0670a196d47159c71758412caf980cfeb11d83723cdfe4b08127224b48e1ec70109d0df51cfdd6e96001b01c52a6dc080018244a7d24be5357adb", shop_name: "najlepsiemobily.sk", shop_logo: "https://y1.sk/t/s/130x50/60405.jpg", product_price: "730,00 €", product_shipping: "", product_availability: "Skladom", 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(){ pmaWidgetInstance613ef2220067a2ef599fc578.initWidget("613ef2220067a2ef599fc578"); }) function docReady(fn) { if (document.readyState === "complete" || document.readyState === "interactive") { setTimeout(fn, 1); } else { document.addEventListener("DOMContentLoaded", fn); } }