var pmaWidgetInstance60c3525e0067a2ef59908147 = { debug: false, baseUrl: "https://public.pricemania.sk", exitLink: "https://www.pricemania.sk/exitv2/?data=1121ef493b7c96a86f77a1ea20f557df:9a500c9fb62b73e14865ce21f5f19c59da3651b34b81d7ebcf873daffb0603bed4b69027b1e65fb7ab804a6587097437afa22501d5a09b93493745244a37582f6d0ac1a8b416b9fd98309525668817e32b9c12d7dee961b98e538547c1c1754aec679a03cb62318c784250c896adfc83e953b0c0dbabd6529977ea3c1baabab36e2db6c5593ee48addd13f494f47f6e6694da558923eb08e57e05f244fbe8e6181c31b1bf17cdb134bdb0979a88a0060f2b56192a7d4a04cda74326f2ff73537", 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); } }