var pmaWidgetInstance603c9481d9685ed272e4f506 = { debug: false, baseUrl: "https://public.pricemania.sk", exitLink: "https://www.pricemania.sk/exitv2/?data=84034234b926ad04634f4cb14a05e213:ee98f32e3a059756bd041b4b3de12ef9cd20fc4d20026cb114dbfe5f03e2c6c92d23669930a0fe8e71ed032aba820d600362a6a8eefa5df899be18e99f1377750fe74df00e02a3d978a7694d5adbb08b0f9c7a939913d58cf83c3eabedd9f6264a956df45ec215ba90e32a7ccabe39ab9f14b4321a5e4ca6703de8da3ba00ca9d51cfdc07c6f5b74be0804ac136900c42f6825fb3cdb5c580cc214803c1e8604e6bda134141485a0bb237a0527b84272453ff0e31c0a8a060f8493c1aef3bd5b17d62432eac0838d5b203ce807dc1d80", shop_name: "bi-xenony.sk", shop_logo: "https://y1.sk/t/s/130x50/52841.jpg", product_price: "18,20 €", product_shipping: "1,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(){ pmaWidgetInstance603c9481d9685ed272e4f506.initWidget("603c9481d9685ed272e4f506"); }) function docReady(fn) { if (document.readyState === "complete" || document.readyState === "interactive") { setTimeout(fn, 1); } else { document.addEventListener("DOMContentLoaded", fn); } }