var pmaWidgetInstance604e65c1d9685ed27228909a = { debug: false, baseUrl: "https://public.pricemania.sk", exitLink: "https://www.pricemania.sk/exitv2/?data=0241e7e6611bc937fc3e1d7ad4418ed3:0c2210e7909db660432618b954215bfcb173f77235fde2cb331845312f3ea3bc5ab6c1fc0a6dafba6ac0f0f239f8eec407756b7ff7d85c47e44f2cfeeb5f8075cae5b09d86499bb4ee3a505b0cd9cf6da342d17a35c802d2a974b3f09d0d9e0b65f6e744e96c6735afa3838c70308954ca4c1d6495716c9694aae32d3691036bd04bd5f43d4a48474c6e6d40a29d5b6029a8d33037ebaede8844f4e0c9352be2450beb189904b3f0ce32343fd9ccea131313da0adcf0b642e1de5a78cddb91fa8a8ecfbc2f74d9dd32a7636aeced90b3", shop_name: "najlepsiemobily.sk", shop_logo: "https://y1.sk/t/s/130x50/60405.jpg", product_price: "265,00 €", 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(){ pmaWidgetInstance604e65c1d9685ed27228909a.initWidget("604e65c1d9685ed27228909a"); }) function docReady(fn) { if (document.readyState === "complete" || document.readyState === "interactive") { setTimeout(fn, 1); } else { document.addEventListener("DOMContentLoaded", fn); } }