var pmaWidgetInstance60ab2e070067a2ef59dba0e0 = { debug: false, baseUrl: "https://public.pricemania.sk", exitLink: "https://www.pricemania.sk/exitv2/?data=702daad2bd9971bf46e6be5c133f5863:3eb897e8659910f279048393472d65fcb2ffb4e1d308838e7fdf043008919296f82686d6253f26893d41bfeba71cfff2cf2db057033f20576474408aedec42c0fae538f02c7f2a16887f5a5255f3883eb9861c14caacdaa65f85904a7674d1b7c15accaeacb07e94337d6ca7a1300ea5d285346cc91be5c34d445660e34fee17ce07d635b424eebbad5af357071aac10a8a9f058b902908cf9815b21e934e2b7206bacb63e49dbcff640a21d38e7daf048475c55f7239a2718efb486a8ec8955", shop_name: "Odpudzovače.sk", shop_logo: "https://y1.sk/t/s/130x50/59075.jpg", product_price: "24,21 €", product_shipping: "", product_availability: "", 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(){ pmaWidgetInstance60ab2e070067a2ef59dba0e0.initWidget("60ab2e070067a2ef59dba0e0"); }) function docReady(fn) { if (document.readyState === "complete" || document.readyState === "interactive") { setTimeout(fn, 1); } else { document.addEventListener("DOMContentLoaded", fn); } }