var pmaWidgetInstance60fe92390067a2ef599494ed = { debug: false, baseUrl: "https://public.pricemania.sk", exitLink: "https://www.pricemania.sk/exitv2/?data=9e0c62f65947c56d188f70181dd82119:2aea2d517c5aecbe7c1f691c9924bbf152910678106db70e334df8878bff601abdcc6b2550769c557cbaed2e1162e06e7688f0d99bcefa39b0992a4ab2fdf54555b6c907db6dc0bed11e49dc749c76d2efb1e6ca71cfca77a3fddaa99bf86bd8a0cc0b2b580451cf838e170a059d4dfe482ddf727640fcca36865d7b25d02e97cef1bdbae09152094d98c88062e721f2c1ccb38265f19c61f79039172bde1db0c190f681ef04a1bc29c011264a4d4a6203bab092cc6aaee8f18876eaae28a3b41709cc2931fafa5e618753ca672e583c", shop_name: "antenka.sk", shop_logo: "https://y1.sk/t/s/130x50/59415.jpg", product_price: "375,00 €", product_shipping: "", 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(){ pmaWidgetInstance60fe92390067a2ef599494ed.initWidget("60fe92390067a2ef599494ed"); }) function docReady(fn) { if (document.readyState === "complete" || document.readyState === "interactive") { setTimeout(fn, 1); } else { document.addEventListener("DOMContentLoaded", fn); } }