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