var pmaWidgetInstance60ab2eb00067a2ef59dc7853 = { debug: false, baseUrl: "https://public.pricemania.sk", exitLink: "https://www.pricemania.sk/exitv2/?data=f2b8d424d6a59594c4d758eb08393e24:13ef42116e5f0e8c831d9b7055fb5ca2f3fae4c9113c8725fe3910f37a59a19ecf6054c1fea7526b0b4ef7237fdc7ace46794c0dd4290d91b43e7714a5f393c2966c0567d826d054a6f8bbb06d1673dc08001be7a93d2cbe64b56793583fed7ff9307f4cea18b3c9841435c4b0e6e26f759b2ba86a907af1d4a70c6bc217c23de5e18aea4019dae84c12cfb9d7378524761432d880898d651ba8b032dfded57b0bb8107c65fc45f9441642bfd017645ce8662a1daf58709ca01fea2d1ad2d200", shop_name: "Odpudzovače.sk", shop_logo: "https://y1.sk/t/s/130x50/59075.jpg", product_price: "49,90 €", 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(){ pmaWidgetInstance60ab2eb00067a2ef59dc7853.initWidget("60ab2eb00067a2ef59dc7853"); }) function docReady(fn) { if (document.readyState === "complete" || document.readyState === "interactive") { setTimeout(fn, 1); } else { document.addEventListener("DOMContentLoaded", fn); } }