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