var pmaWidgetInstance5fc0d5d4d9685ed27295c482 = { debug: false, baseUrl: "https://public.pricemania.sk", exitLink: "https://www.pricemania.sk/exitv2/?data=a79ba632447f2967b2e975eae722c09d:66e6a837c762ebf37bc0c5c683c19d18b4ce2ac1ff675ff9fcbcd6dc0b9105c86b40a7ae063bb6a201aafed66fc07610da72e40f2642e0d5e1fad5714e694686d3df1903efae4c244ce838d7e9111d31a3b9b58836b30bf68623d7c13f99834fdababf5b17a4cdcaa828e43fd97f826709e99eeca479c97c9e418d6233537e91b208c41c9f289083dad25ab7d8ff3a20eb5eae972c4abef7b5cc8e4924cf6407fbc7c4cc53b41d5043efa5f772e41ba03dad344ba26361c44eef2e8842ef15d7", shop_name: "GalaxyMarket", shop_logo: "https://y1.sk/t/s/130x50/59525.jpg", product_price: "83,94 €", product_shipping: "3,50 €", 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(){ pmaWidgetInstance5fc0d5d4d9685ed27295c482.initWidget("5fc0d5d4d9685ed27295c482"); }) function docReady(fn) { if (document.readyState === "complete" || document.readyState === "interactive") { setTimeout(fn, 1); } else { document.addEventListener("DOMContentLoaded", fn); } }