var pmaWidgetInstance61a77768069a975de526ff8a = { debug: false, baseUrl: "https://public.pricemania.sk", exitLink: "https://www.pricemania.sk/exitv2/?data=6db32fa7e4101d103220c58b2211dfd5:c1a75276b782e13998c251cbf7ec1120f2780de05c0103c47d8e4b9fc3ec862c90f529331bcaefdac0aeb484f5b43a524feac09fc672683941dfcd974c613c1468828a2dd30a0c8e44a2a9f79c5ae0ba460f631ae012f68f2f91975cf884db8a42b5dadd1ce18fddcc42e4972e8e6c32b787c2162ee9ed826dad67803708c424ef51d7962576eaec6bf037aacd822d13a73aea96640f9916c1886ddbee40dc1193ae237aae233e653c86ab59706ba693cbaeae265efa34370bfab00058c29ba5", shop_name: "profikuchar.sk", shop_logo: "https://y1.sk/t/s/130x50/42889.jpg", product_price: "8,40 €", 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(){ pmaWidgetInstance61a77768069a975de526ff8a.initWidget("61a77768069a975de526ff8a"); }) function docReady(fn) { if (document.readyState === "complete" || document.readyState === "interactive") { setTimeout(fn, 1); } else { document.addEventListener("DOMContentLoaded", fn); } }