var pmaWidgetInstance603dd10ad9685ed2728e8e9f = { debug: false, baseUrl: "https://public.pricemania.sk", exitLink: "https://www.pricemania.sk/exitv2/?data=40d99bd456bda4d2b21102e6ca7590dc:80658ac5304981edf9804bef63c191793b5554156c5c2fa946188880b3d77b7a0649708d60e7d62f1c66cd6b3acec1a79c6d05c05fe7b3803310685ccd63c6c56d6e6dc7c41cb27d184392b130201ca446bbb2ca5941f9e32d7ea9f606ee5e9e3228017afe714e9543146f9614cae42e82520da8542409fe17d0ce5adb53a8134b994cdf956545b2b6e4cbdf146c39dece97ca0b87e0a8196eafffb86fd1e44d8d5b2ca6171d1921fcbddfc8564a1c04924d77dcd0d2148bb6f8e3d030ada8ec2a04f707459eb89c8e64c38c2c489ff5", shop_name: "predomyazahrady.sk", shop_logo: "https://y1.sk/t/s/130x50/47035.jpg", product_price: "344,87 €", 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(){ pmaWidgetInstance603dd10ad9685ed2728e8e9f.initWidget("603dd10ad9685ed2728e8e9f"); }) function docReady(fn) { if (document.readyState === "complete" || document.readyState === "interactive") { setTimeout(fn, 1); } else { document.addEventListener("DOMContentLoaded", fn); } }