var pmaWidgetInstance67176e79ae16db34661c88cb = { debug: false, baseUrl: "https://public.pricemania.sk", exitLink: "https://www.pricemania.sk/exitv2/?data=cd7071c2280af4e983dfa9a2f0c6c2de:5e8d5197eb0cf0a3c4d9958d26efa111783bc0647bf4c88394c80606c507733dc674ca8d4ab51c409fc12ca13ecbc6fb51fa1b2f1b6a26d37382e2dc94263752de537ab94f428b5d7dc496daee77e64a34c4dd9c16f9899eea078b07d9bb8774abba07a8d035b82ebdece0ad58c493e7c4cec21b155106b1496f3896f9d68cc50363072c8d355ced381b6da6f6e0e57e818fdd57c8110a6acab4744626f2f6f984075525c1d20cdc191de255ef0b625d3c47667bd867165a9b8d349a99c7ccf1108855e39028033719f4a200e210d4e1", shop_name: "GalaxyMarket", shop_logo: "https://y1.sk/t/s/130x50/59525.jpg", product_price: "577,84 €", 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(){ pmaWidgetInstance67176e79ae16db34661c88cb.initWidget("67176e79ae16db34661c88cb"); }) function docReady(fn) { if (document.readyState === "complete" || document.readyState === "interactive") { setTimeout(fn, 1); } else { document.addEventListener("DOMContentLoaded", fn); } }