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