var pmaWidgetInstance65f040abae16db34668ae315 = { debug: false, baseUrl: "https://public.pricemania.sk", exitLink: "https://www.pricemania.sk/exitv2/?data=dbb8be3cf5f3d44ef69d09ee125fdc5a:f8a383ec06cd8c4ada2424478f44c470204f928ab490f6e56c6bd1950861cd7c5f69a91dbd3e68979bde3fd5de03172ff7cfa3c923ab192661b6d8057dd04ce5f18a04d0eac24103f49c176af5def262b598128312b0a1ff56df1994755ff360b75d88c15b91624b394a4d6a989e3a3972ecb1332ed61576471c6e82b75cb0abf81c922d7780d91e93f707643e40bfba5b5cfaa3052bb06822620d082365ba6d0aa83006e820ca874441e39c4cd293f25be02c275b1f31c9f8fea9ed795b6c7509881d6fd0ea46af17860e087fa431ea", shop_name: "electronic-star.sk", shop_logo: "https://y1.sk/t/s/130x50/44673.jpg", product_price: "75,90 €", product_shipping: "0,00 €", 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(){ pmaWidgetInstance65f040abae16db34668ae315.initWidget("65f040abae16db34668ae315"); }) function docReady(fn) { if (document.readyState === "complete" || document.readyState === "interactive") { setTimeout(fn, 1); } else { document.addEventListener("DOMContentLoaded", fn); } }