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