var pmaWidgetInstance63f37b33421832890571ba25 = { debug: false, baseUrl: "https://public.pricemania.sk", exitLink: "https://www.pricemania.sk/exitv2/?data=d2a4baf84b74617b6a8264daf3e24d83:941d5839543e7abe3d96f88460bc8af0541478b114a1843dc44b844f2d7b2d39e2d3b64b5f4ab6eea7fc20c02b2b36553c5ed55b42b8277528435825c5030b493f369ec426d3bc5bd4a22d9f3c4de4b4a6820079fe41e228e6bc2e1544440be5d1f09063a2e785ee1ba323cc63d9a8c6883d049c0defffb556de993e1559d62816b3f8851dc3fd89d13ad3b54f066ac7329850f74493e09a4ca28885d259349c3535086399be51a728e13504af4ef0c3e48a04510bb7bf6f9ade41749f1f9e40f6a401838d0159737b939c03ae5b4424", shop_name: "pneunaj.com", shop_logo: "https://y1.sk/t/s/130x50/52071.jpg", product_price: "172,20 €", 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(){ pmaWidgetInstance63f37b33421832890571ba25.initWidget("63f37b33421832890571ba25"); }) function docReady(fn) { if (document.readyState === "complete" || document.readyState === "interactive") { setTimeout(fn, 1); } else { document.addEventListener("DOMContentLoaded", fn); } }