var pmaWidgetInstance60c3525e0067a2ef59908147 = { debug: false, baseUrl: "https://public.pricemania.sk", exitLink: "https://www.pricemania.sk/exitv2/?data=bccd0317951abb03e7a2a5a1a99bed0a:3c02b8208173d394e2ef98c19d64d4aed6c6c937bbeeca44ccbd14499a4e5d94ce1c56bc2a4fd146fd58d7e773ab9dc8c7b003adb9e39de91e53841c5117b3535ca690ed68ca695fac01f0343f85a902e7ba7bad62190b937374de3e20c7ba233a3dbcdc50d1a3f945c7a2222404ade003597fd703ace52f6ed8c3237f9dd35008fc4013e4ffefd62f8e62ea399ccd1e204d9286527d7e44dead12427b799054785f19bfea145be660cb6917c914cc71eaaf399bc734208f674900bb15a8f089", shop_name: "instrument-naradie.sk", shop_logo: "https://y1.sk/t/s/130x50/57937.jpg", product_price: "13,26 €", 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(){ pmaWidgetInstance60c3525e0067a2ef59908147.initWidget("60c3525e0067a2ef59908147"); }) function docReady(fn) { if (document.readyState === "complete" || document.readyState === "interactive") { setTimeout(fn, 1); } else { document.addEventListener("DOMContentLoaded", fn); } }