var pmaWidgetInstance63f88b4b4218328905a74554 = { debug: false, baseUrl: "https://public.pricemania.sk", exitLink: "https://www.pricemania.sk/exitv2/?data=700eccbdde6ea718de6c5b9ed701d224:465b2b2a50c04a2750822f196e500ca4818c05d6d9d6d2e658286e856413fca94f3de0ea2ce4958172eb3de17ab10d2d19d50c35a5be53d121be97b56e8ff7cb632c7a3d2876f04348df12b312d378b53e6b93bb23cf48519cd304dfe6c7d795bacc8a3850e3c3fd5d0a7d4e91b597584dacc70bd1b280f17145c86171bc15c9063427554bd3d3c3b89fd2da675550333c5e747bc2173abdb27576b924906273230921959f1a27559777fbd061b607a403fd587e9ed7cbddeaeb6c1d6345e51c712ba3cdd6bb80c1e3518c1116ae1f7d", shop_name: "alza.sk", shop_logo: "https://y1.sk/t/s/130x50/215.jpg", product_price: "809,00 €", 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(){ pmaWidgetInstance63f88b4b4218328905a74554.initWidget("63f88b4b4218328905a74554"); }) function docReady(fn) { if (document.readyState === "complete" || document.readyState === "interactive") { setTimeout(fn, 1); } else { document.addEventListener("DOMContentLoaded", fn); } }