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