var pmaWidgetInstance603e54b1d9685ed2728d0e1c = { debug: false, baseUrl: "https://public.pricemania.sk", exitLink: "https://www.pricemania.sk/exitv2/?data=43de915629ea524a2a6e2598319ce5d2:1465b8eb4ead9888a8898e76d83fbd19cf4067a0f22f4d24b5430afcfa6c893c4030898b934da61fcf748417bfd3bdbf536df1dfdb8a3e0f8f1cd6dd7078f687347200b7fdd2421fabef4986b15f72191efff51b0a45eac0c91b8c71c8179f1c30e3901a9cb9eb459b0c890b9f5e5deb571e6df5434f6fd46fa4b47668330abbaebb825d613ac4593bc0fd1258d82985af54970cc35da3eff5976b1ba0cdf7b749b1aa6e945125d704885ac2467a7bc77fac3f535ba2395ad3c310dc198d69b2", shop_name: "Ekaviaren.sk", shop_logo: "https://y1.sk/t/s/130x50/51729.jpg", product_price: "17,70 €", product_shipping: "2,15 €", product_availability: "", 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(){ pmaWidgetInstance603e54b1d9685ed2728d0e1c.initWidget("603e54b1d9685ed2728d0e1c"); }) function docReady(fn) { if (document.readyState === "complete" || document.readyState === "interactive") { setTimeout(fn, 1); } else { document.addEventListener("DOMContentLoaded", fn); } }