var pmaWidgetInstance602fac6cd9685ed272e72062 = { debug: false, baseUrl: "https://public.pricemania.sk", exitLink: "https://www.pricemania.sk/exitv2/?data=db907f03189b7ff1b54e92ba03096227:26e4e99e7af485baa1f7243ffd4ac386e8b4546067eb9bfa1356225a8c3554e7235029da8dcd0d5fb0953a7125b95f2f76b5f356304b86eaf15fc97a21b6c74e8eca0d82069cf50a5f062c82de31dadfba2a6967383de151ff7ceacf22353c28eba52d7c0e3f343f46367ac930f934d0024362b6262957e589a74273b06ada9ac889364bbabb951892ab0260e12ac255fe86fba9e86a40b06ff699b84396144026c9923cc00a4f6a8d5f1be43cc636a7b5da8d14f93def6a48b7371e66447df21d53d2cc9c2f48b9ab090c0e6a24fbdc", shop_name: "najlepsiemobily.sk", shop_logo: "https://y1.sk/t/s/130x50/60405.jpg", product_price: "934,00 €", product_shipping: "", 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(){ pmaWidgetInstance602fac6cd9685ed272e72062.initWidget("602fac6cd9685ed272e72062"); }) function docReady(fn) { if (document.readyState === "complete" || document.readyState === "interactive") { setTimeout(fn, 1); } else { document.addEventListener("DOMContentLoaded", fn); } }