var pmaWidgetInstance60410207d9685ed2726724ce = { debug: false, baseUrl: "https://public.pricemania.sk", exitLink: "https://www.pricemania.sk/exitv2/?data=9b3f5087de45bd70c4bc10ed736ff887:e088d2e915604d45bf65250e311e8cc1b57b6aa863307c98c23439ea8c3e2936365eaa273c82f0d37d6a43ea2b1a09ce9529603077f5e7c87ec5e32a9edc84758b28e688b5f89b079a51442c9e3ece14a727daf378d27b6df75c1c7a9b73fa8b0d6fbea81f543c09837dfde007be9c61c0daa05c397891ce197d9d3d0cd4263bc7b196bdf41746c064fe9a9f45a4eb71eaaf32ee20ad2c6ff00ed76bcb73e87a4322f50e2fb10f08f57459cd960aa9b143ef690d5afc7a50d6888b873e01ca19", shop_name: "GalaxyMarket", shop_logo: "https://y1.sk/t/s/130x50/59525.jpg", product_price: "19,62 €", product_shipping: "3,25 €", 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(){ pmaWidgetInstance60410207d9685ed2726724ce.initWidget("60410207d9685ed2726724ce"); }) function docReady(fn) { if (document.readyState === "complete" || document.readyState === "interactive") { setTimeout(fn, 1); } else { document.addEventListener("DOMContentLoaded", fn); } }