var pmaWidgetInstance6160498c0067a2ef598081ba = { debug: false, baseUrl: "https://public.pricemania.sk", exitLink: "https://www.pricemania.sk/exitv2/?data=486ee7e4f75de910ca14f2828b79ac5c:b6864cce839ebb4bcb95575297fd16b42d57f7056ba727106a08dc1bd9b995483c9bdc6441c0bcbb4915aba113a9744d7be6a97ffd42a50b3e95281f972d0de0718ba14b2bdc957ee3d68571c62c820044cd0e4aac127b48f92061b51169ff179a3f32966e57a908f79d188ebb6e711770001055eaa69168ed48cf7705a7a3b59c4d0785f09d4023036923a4569cac6779198e0e86cb365ba42c0c7df3fb066148a4311e68ca34323a9636fbc8a97e92b38f180fe61dd8c899a8ad946936c19305e8777e94f1faa3e9baf5e536cedbf9", shop_name: "najlepsiemobily.sk", shop_logo: "https://y1.sk/t/s/130x50/60405.jpg", product_price: "730,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(){ pmaWidgetInstance6160498c0067a2ef598081ba.initWidget("6160498c0067a2ef598081ba"); }) function docReady(fn) { if (document.readyState === "complete" || document.readyState === "interactive") { setTimeout(fn, 1); } else { document.addEventListener("DOMContentLoaded", fn); } }