var pmaWidgetInstance64199e594218328905fb8eb3 = { debug: false, baseUrl: "https://public.pricemania.sk", exitLink: "https://www.pricemania.sk/exitv2/?data=b40883e990582467f0cc2bdaa0581d9f:d1b762e84d8bd878e0b0f3b039d2d9b48db64a43028f842daee749126add4fdd661017224757bdacde4aca9d0b403ae16f13dbd8f7dfad94d836031caaba7e8cfec2e2e1eb7a888ceec5972f88075b3b19f565c00661db9de3ed383719a60d6a56c5ba1b42bb5d4b006f2afe61682e41bad294e7a9762511d5fec5a5b8d2b738acb62e061e10e0caa8fff7569760409b72c1c25df3f79fb0569b95bf639aebd0e1505cce4bc637636a069349e4c10768418f8725ba1aa76caf6a863b410ce82e17c69ec5b24434ad15cdd6e1cfb66f93", shop_name: "pneunaj.com", shop_logo: "https://y1.sk/t/s/130x50/52071.jpg", product_price: "54,59 €", product_shipping: "", 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(){ pmaWidgetInstance64199e594218328905fb8eb3.initWidget("64199e594218328905fb8eb3"); }) function docReady(fn) { if (document.readyState === "complete" || document.readyState === "interactive") { setTimeout(fn, 1); } else { document.addEventListener("DOMContentLoaded", fn); } }