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