var pmaWidgetInstance619e5511069a975de5900eb3 = { debug: false, baseUrl: "https://public.pricemania.sk", exitLink: "https://www.pricemania.sk/exitv2/?data=a3914e44294f8b2ef0d4514028845f4e:8fb50120cbb4db0584fdaa5fe07753d0b854b2b305f3384ca8431749ad769392619e23a2f0078367f358d47b13bbe1685eefa341037d78e43f0e3ce175fc3b6bc6537a844b8604dcf518692a0e22972aab63fb4dc1ca0334fa4cda03938ab9e03000b9f01dcf781f5ecdef2520ad49333d4f93b41ed6f6f99a947e65c35eb3c843cb64c03acba697faa279b5a5bdbb3155fa61615b9e1b1014125107ed7d889036cadbcd61f28c44c8ed445e010dd97da292faea867dc03cfea743cacfb2b8435bf87ce40f38ffb6950587bf6e9b1265", shop_name: "alza.sk", shop_logo: "https://y1.sk/t/s/130x50/215.jpg", product_price: "66,90 €", 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(){ pmaWidgetInstance619e5511069a975de5900eb3.initWidget("619e5511069a975de5900eb3"); }) function docReady(fn) { if (document.readyState === "complete" || document.readyState === "interactive") { setTimeout(fn, 1); } else { document.addEventListener("DOMContentLoaded", fn); } }