var pmaWidgetInstance65f03942ae16db3466736e9d = { debug: false, baseUrl: "https://public.pricemania.sk", exitLink: "https://www.pricemania.sk/exitv2/?data=5aef91309abe18a3ddb6f40b698e6639:45d545ea816a570e10cd890688b9b2eeafc4cc9043131869cef04b3c096347508e471a4610093ab25bdb7a1fe12368df4cbae30b16adddf4c68a402acb0fc68714b3d2f520942c699ca45cb75acfc7be75c54e0f3a6ba2a36130dff697d2602f241975a699a4bebc0a8bcccdb425f2fa77b6bda1a4ee876a3fbc92c598a8b4bcb7f71d25b2c24015c4f016a1bc75bc7e2973df95fa44ab630766db68ac8996cfbfcd75624a11651bfbd3549235e0df8e8df6da82b9ab384225a608f63e26935c149ef06d48d265af43c93a4df67cff56", shop_name: "MALL.SK", shop_logo: "https://y1.sk/t/s/130x50/135.jpg", product_price: "1099 €", product_shipping: "0,00 €", 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(){ pmaWidgetInstance65f03942ae16db3466736e9d.initWidget("65f03942ae16db3466736e9d"); }) function docReady(fn) { if (document.readyState === "complete" || document.readyState === "interactive") { setTimeout(fn, 1); } else { document.addEventListener("DOMContentLoaded", fn); } }