var pmaWidgetInstance63ff4be242183289057e5459 = { debug: false, baseUrl: "https://public.pricemania.sk", exitLink: "https://www.pricemania.sk/exitv2/?data=48e6c7f6185c7cab24e51010959095dc:eccedcc56e26c54c81def58a52ae4d00e03a37dd9ff48cba5b82a5be81b6c32166ae86f3490208db41db3a8cc4f5840bebe9a15b9259661fb3cbb3ac9bad76907f11cf65a9efb3fc7f2ee5f06792c463f2834168afac5caf9ddaeece298d0b028df876c8f9812f2ed8181481d4ac130cb6065afccd03689f28756c827b056b6f85c4aa116ce92e4b76672458a0d03452ea982704d1f866a06fdcb0b41685db004b84b5dac4612ce5c50089a454a056f0c377841f6c433b86a59856b5251c520efea5ac5d712b923f6218ee0fac4fefa7", shop_name: "arco.sk", shop_logo: "https://y1.sk/t/s/130x50/45797.jpg", product_price: "66,99 €", product_shipping: "2,00 €", 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(){ pmaWidgetInstance63ff4be242183289057e5459.initWidget("63ff4be242183289057e5459"); }) function docReady(fn) { if (document.readyState === "complete" || document.readyState === "interactive") { setTimeout(fn, 1); } else { document.addEventListener("DOMContentLoaded", fn); } }