var pmaWidgetInstance610130c40067a2ef597f3e97 = { debug: false, baseUrl: "https://public.pricemania.sk", exitLink: "https://www.pricemania.sk/exitv2/?data=4b0d4bf2202a62cb654c6ac85476e148:272ccd474dd01d9864b6abebc81be80d598dbf820d75db889998f72fa6cf4a95fa8a3084dfc3f5f2e9ab03e3dd9db8b4003f46fc5a6588d3493eb5998da11a9a886c29121ecb67298d35aa3838a0260d413ed93caecf763d0fedaf611108fe94c3e101565e515594961b8a4a7040cac4927b54cd784b7f0f1fec0c413bfb37ee1f73fbbe9fa9f4ea9768aad8d090c0e3bda8158a81ed476e4968de17bebbceb52ecbb3a69d9704d3fedb3bde26560c47c0d44c6aca2cccaedd7d61336eae7fc1586095d967d8ccd924ede44a234e229b", shop_name: "najlepsiemobily.sk", shop_logo: "https://y1.sk/t/s/130x50/60405.jpg", product_price: "529,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(){ pmaWidgetInstance610130c40067a2ef597f3e97.initWidget("610130c40067a2ef597f3e97"); }) function docReady(fn) { if (document.readyState === "complete" || document.readyState === "interactive") { setTimeout(fn, 1); } else { document.addEventListener("DOMContentLoaded", fn); } }