var pmaWidgetInstance609151a00067a2ef59007a64 = { debug: false, baseUrl: "https://public.pricemania.sk", exitLink: "https://www.pricemania.sk/exitv2/?data=4ca3e572cc00c080d65476cd14322521:d98850e7c47aa5469d534a20bfc5a500b6c4281bbed42768e288b969ab4f7e96b152df93b58f0e8bd7308fd4f784d69cff4b280d80fef445803829a6028a17ac6e63c8a91938cdb23b0f6edac1ae12fa0b53a94043836750f16aac1a52e46c29c4cb386a5215aafbc916050472489f0c45188204ecbd55c249adcb3c0d5aeb011c16d39a02dee116168379adda8c0b3fe854b44e5b3b8724828c9283eec4979ecc8927b6d4df93b392f303dfc52c102269f1a1c73b189762f664e947261c4e76", shop_name: "MALL.SK", shop_logo: "https://y1.sk/t/s/130x50/135.jpg", product_price: "33,90 €", product_shipping: "3,90 €", 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(){ pmaWidgetInstance609151a00067a2ef59007a64.initWidget("609151a00067a2ef59007a64"); }) function docReady(fn) { if (document.readyState === "complete" || document.readyState === "interactive") { setTimeout(fn, 1); } else { document.addEventListener("DOMContentLoaded", fn); } }