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