var pmaWidgetInstance63f8a9994218328905155285 = { debug: false, baseUrl: "https://public.pricemania.sk", exitLink: "https://www.pricemania.sk/exitv2/?data=eb88eba59000d97c9289af529e885ebb:f9614027fae0f0d76849eaeb0171ae1d0fa7c9fa0ff37fad10d911ac9ba86e755d0824050e9df827c849fe9400aa5c12044ef0b71e467638b26f4c3a8065667288cf288143854ea88b3e93f3f53af3c94a77440b63f3729f044eef1301dfe25705376d19b060e5dac3dfb3256417c8022706ec96edc9b6700668bbe7233863289eb82ed92fe90e80c8e0dc1b5df4d4af15fe38bf3effd131718dcd33dd1969b763800853e311dd552f73bea59e76900c4b57594626ae2f3c66f4ade5d9342c15b9c520d79cb94b9366a9d8ffb97c1f3f", shop_name: "GalaxyMarket", shop_logo: "https://y1.sk/t/s/130x50/59525.jpg", product_price: "203,65 €", product_shipping: "2,49 €", 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(){ pmaWidgetInstance63f8a9994218328905155285.initWidget("63f8a9994218328905155285"); }) function docReady(fn) { if (document.readyState === "complete" || document.readyState === "interactive") { setTimeout(fn, 1); } else { document.addEventListener("DOMContentLoaded", fn); } }