var pmaWidgetInstance65788170ae16db346697415d = { debug: false, baseUrl: "https://public.pricemania.sk", exitLink: "https://www.pricemania.sk/exitv2/?data=6134853465c019f4ad5c8465548ed932:0ec40a220456114669ef9a7af4289f28c2607979730875e16ed2325f0b190317b85f67c08befcb1c7444f87b6f4d2f89fcd048a132cfec0564a725087fbfa19be8bae3747bd2dfe36a71524ed285e12ee55c919ca0fd70a3a0ef778c667bfbbe564fc7b7493d7dfbbdf2def9ff426c2fc057aabf61b73c7cd5cd8a554aa5874da970190efa40336b7d80c1d44eeb2bf870ca868c2a81c0d5084f7ac37eb0004c94d1983c47e6e701ce733a513d736ad40d1a5045143acab35f5d4e4d8d3b447b2a668f6601912054916d1e511670e7fb", shop_name: "MobilPC.sk", shop_logo: "https://y1.sk/t/s/130x50/46049.jpg", product_price: "58,06 €", product_shipping: "2,90 €", 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(){ pmaWidgetInstance65788170ae16db346697415d.initWidget("65788170ae16db346697415d"); }) function docReady(fn) { if (document.readyState === "complete" || document.readyState === "interactive") { setTimeout(fn, 1); } else { document.addEventListener("DOMContentLoaded", fn); } }