var pmaWidgetInstance63eb8ee94218328905a4116a = { debug: false, baseUrl: "https://public.pricemania.sk", exitLink: "https://www.pricemania.sk/exitv2/?data=537e17ea00e685a8e6a28be7315867a5:f5233a14196f9bf0637177ea8297e11ab722c73e9166915ad28afd81cf5a02a8fe875e9d27112a2c431bfbf591e09c7a9c7d2211396450f198331b6470486933b8edfe6c069b4a3dd5ea58f8fa46b180a4577ecf46cd9fcaaf4e881681b867e47765d36ac0aea4c9c85ad56d0b7eedf008fe18b4880e3e593fc7c55546501b1bd26a00f1ac8a3586c45a90b39b1ccf8bbdfd516dacb71efefd09aadbfb17a99cbf8565692ec18b73bbbdca105f462d9b0fab6cc3cbd0b4c15b59dd157df09ab56cf7174f3658510dd7c393d88a7b7cb4", shop_name: "arco.sk", shop_logo: "https://y1.sk/t/s/130x50/45797.jpg", product_price: "299,00 €", product_shipping: "2,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(){ pmaWidgetInstance63eb8ee94218328905a4116a.initWidget("63eb8ee94218328905a4116a"); }) function docReady(fn) { if (document.readyState === "complete" || document.readyState === "interactive") { setTimeout(fn, 1); } else { document.addEventListener("DOMContentLoaded", fn); } }