var pmaWidgetInstance619e53b4069a975de5872ff4 = { debug: false, baseUrl: "https://public.pricemania.sk", exitLink: "https://www.pricemania.sk/exitv2/?data=9c134560f052e481041014fb368984a5:876d430b81d96521ad58148e1275b77a3e314e384a071a948968af9a90a28ebcbcd5fb3fd9c6fb754f7ca33bccbed1e5beb254a0966f9469e53b057244cbcdfd7fa280c2857126f7079522fc257c08d4c9d07a11824bdc09571e45b6a922c5c68d55c610a6b5c2cb76782d927266306a7f8c799a0a83f8b3608ed5cd3e8c5b34dbe13bdb4164a9107fa8e45e719b3c6947c5de44c051860393f2c343d5f5edc66cbf3440451226c058d974ee462252301bd1c0faf5233363e42199aedd36aafa", shop_name: "Autovip.sk", shop_logo: "https://y1.sk/t/s/130x50/56575.jpg", product_price: "191,60 €", product_shipping: "2,50 €", 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(){ pmaWidgetInstance619e53b4069a975de5872ff4.initWidget("619e53b4069a975de5872ff4"); }) function docReady(fn) { if (document.readyState === "complete" || document.readyState === "interactive") { setTimeout(fn, 1); } else { document.addEventListener("DOMContentLoaded", fn); } }