var pmaWidgetInstance63626112ac365ae374a87e1f = { debug: false, baseUrl: "https://public.pricemania.sk", exitLink: "https://www.pricemania.sk/exitv2/?data=0bd6dd2efcaa80ba350e498a882c1337:6445d47704afa18ced31ffa517bdc8e6bd04490df2a6183e205c0639b5bb40386b56fac0e9455c320133e5bc2c060f718a0dde8e99a62f9192ce898bdcaa6cab4262486c6e4591edfc4cf1f15f5326553a466243d81f40dfeadba73f94bc686c84d9d06d98f4976cd046a66f006a98d9c29b5b6a1b8f635017fc49ef161009e40c8e00896b1e57503a20fc685cfa44467e5c477b158ac35cafa6381782e14905a6c0406bc844935e8a832106d844f0690223a7949be2e97210b35570703a003a2a38bcd463ad2873f18ac8b76e9da10f", shop_name: "pneunaj.com", shop_logo: "https://y1.sk/t/s/130x50/52071.jpg", product_price: "93,49 €", 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(){ pmaWidgetInstance63626112ac365ae374a87e1f.initWidget("63626112ac365ae374a87e1f"); }) function docReady(fn) { if (document.readyState === "complete" || document.readyState === "interactive") { setTimeout(fn, 1); } else { document.addEventListener("DOMContentLoaded", fn); } }