var pmaWidgetInstance603e48e8d9685ed27273070e = { debug: false, baseUrl: "https://public.pricemania.sk", exitLink: "https://www.pricemania.sk/exitv2/?data=62da7c67e214c943f4c97aa448f2b760:74e92d54279c4df764da803cdb37b511f96b3a6e915c0b38ae1f8147c8d2cae863a32090f5a15dcff1b8c7ffd096fc97268d87d77ed07e5c2fc6a697e56e0d12a3877a30a23421e2b55dc7971ae4c7a6d833b8d280ac3e6449daade99db3bc34717526702beed2a0baae410639400594510b811feca08a5dad2cd605c75509c3a64d526569d8c7e6e66111a5c6e0a608d69d82843decaf74c8ea21e2c20e6056846bda7546e91a7c65182780a5417fb4728ee82ac1761504811e0cf0442e8252", shop_name: "knihyprekazdeho.sk", shop_logo: "https://y1.sk/t/s/130x50/56613.jpg", product_price: "15,99 €", product_shipping: "1,99 €", 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(){ pmaWidgetInstance603e48e8d9685ed27273070e.initWidget("603e48e8d9685ed27273070e"); }) function docReady(fn) { if (document.readyState === "complete" || document.readyState === "interactive") { setTimeout(fn, 1); } else { document.addEventListener("DOMContentLoaded", fn); } }