var pmaWidgetInstance6155ca530067a2ef59182097 = { debug: false, baseUrl: "https://public.pricemania.sk", exitLink: "https://www.pricemania.sk/exitv2/?data=296ed9fce16d878c5e7ee292af282bc3:969e92d0cfe6208e0bbf763ea2de82cbbd65519e351aedb4ee60c4e4e320f5ef059daaef0f8dafb53a48df7e243bb3ad96219ef41e1c8f09d84b8900eb750af02ec185b54c2839204b57a19b425617944372ac402e2d5aaf8ebe5b45d6702330b97219beb5ffd52123c35db35d4082fa343954816d354f7bba857bae1493375f9978947176196146d9ca8da09a7e0d860148e6e813b76a5dd4f8a1498c963c4ea081c04ec17fc24bb403a690fcdac79ff527050f79446940a2d8eeba6b7ae07afb20d02835ba16d8283d737e185efb4d", shop_name: "alza.sk", shop_logo: "https://y1.sk/t/s/130x50/215.jpg", product_price: "537,90 €", 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(){ pmaWidgetInstance6155ca530067a2ef59182097.initWidget("6155ca530067a2ef59182097"); }) function docReady(fn) { if (document.readyState === "complete" || document.readyState === "interactive") { setTimeout(fn, 1); } else { document.addEventListener("DOMContentLoaded", fn); } }