var pmaWidgetInstance608e73d63975337b9e645577 = { debug: false, baseUrl: "https://public.pricemania.sk", exitLink: "https://www.pricemania.sk/exitv2/?data=71125ea2792f859a1ab0eae75bba5dc6:6f72452a3d95c233d4ca0b6fdf577e75bb792185f9d0dd75c3b42257c737704e41cddc78895e7c72cc33b1c82ce2edb0e97a85cedcdebcf6c6251f733957f2a472701ff8e12e1eb655ae69b4833c74ba94b7da9e91a6cea89019668ab3f7a4f2c337d24e9f68fe50663230ca1652bfe0aa2aacc709397181a012828898f7265719116eb1c79b5b1a345e646c11e9d196a4d6f9696f540cb6db900edb6522e0dbbb45b295bff78bd34c999aba68cd217b1a739b9934395443d7b79f4cea02fe70852436522f55048d3995d83dabca9a5d", shop_name: "alza.sk", shop_logo: "https://y1.sk/t/s/130x50/215.jpg", product_price: "313,90 €", product_shipping: "", 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(){ pmaWidgetInstance608e73d63975337b9e645577.initWidget("608e73d63975337b9e645577"); }) function docReady(fn) { if (document.readyState === "complete" || document.readyState === "interactive") { setTimeout(fn, 1); } else { document.addEventListener("DOMContentLoaded", fn); } }