var pmaWidgetInstance602e7495d9685ed272188049 = { debug: false, baseUrl: "https://public.pricemania.sk", exitLink: "https://www.pricemania.sk/exitv2/?data=bbd6bebccab77c332241053ffaca4757:2a820aa2ac1be4f1b1f29e589d192aa7f9e3a0ba1216835c91438b3ee06b7fa0eae029bef1c51b4d993787ec6e9654a4b6460d5d8434d055426ae3a2e74681a924b293c374b2d14fc5989f3709a1a19d402f2e4458d6c766b568c666cfbe732379a1d2181e71bffc0ce1d7ae3595bb9e74fdc1576b8383b7b6da5a0914febd7cfb6cfcc9888e9cf5f2d106e9e678600802283c2e731fb21d777f6d447295b3dcc7e5e1b26b80d9be89850a0a73b105c98adbd3e8df954302ca19eb3ec1760098b974dac24994534f4c8ac236b057f07d", shop_name: "drmax.sk", shop_logo: "https://y1.sk/t/s/130x50/52053.jpg", product_price: "496,99 €", product_shipping: "0,00 €", 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(){ pmaWidgetInstance602e7495d9685ed272188049.initWidget("602e7495d9685ed272188049"); }) function docReady(fn) { if (document.readyState === "complete" || document.readyState === "interactive") { setTimeout(fn, 1); } else { document.addEventListener("DOMContentLoaded", fn); } }