var pmaWidgetInstance6006ba4bd9685ed272caf9ea = { debug: false, baseUrl: "https://public.pricemania.sk", exitLink: "https://www.pricemania.sk/exitv2/?data=a625542a43cef8158d23d4eefefbe879:df1e36bcc5bd86b5828df30f8875c9cb84545d166480ae288071694551194f1c9b487d87af9393501e4b1825ac0a83400cfaa827f7974ef63773fea80fc78f160f6e768faa35bc5d5db17006787a3cb86bac1b943bdc5535812937fc2da434fe086d0ab3fa9c5bf9cefcef1b9c8509405b2cab784103831ad62c2c128574b83fcad88828391a0b81b9340277bdaa0a7713a054dcc65b94a9558e593ae9996dfa45fd77d7de7db6f21d528ff5cfc7806fcf031c37ee84cd52fcab4ed1bcd0edb8", shop_name: "GymBeam", shop_logo: "https://y1.sk/t/s/130x50/46829.jpg", product_price: "14,50 €", product_shipping: "", product_availability: "Skladom", 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(){ pmaWidgetInstance6006ba4bd9685ed272caf9ea.initWidget("6006ba4bd9685ed272caf9ea"); }) function docReady(fn) { if (document.readyState === "complete" || document.readyState === "interactive") { setTimeout(fn, 1); } else { document.addEventListener("DOMContentLoaded", fn); } }