var pmaWidgetInstance63612ae4ac365ae3748c3146 = { debug: false, baseUrl: "https://public.pricemania.sk", exitLink: "https://www.pricemania.sk/exitv2/?data=6bbf4b6fd9c0adee0f36a9cda23b6c83:52bb31369cb21e1ee614864fada78ccbf0f72bb55fa254e275af5bb93e77ab2de363f7574083118e3d45665fe3c3d1300d82feecd19aa3f20d197e5c875a7f46f77ccdb89b01b2005ebe70618808aa0bcd6dc5a3dfd57269a49bd267b756bed141ca242cbf929bcd87bedd4fc2b1d0f0545a8cb605f552ba15125623b816b6da476cc322e1ca0c723fa331709ae94ad3659c8cfaac0133e6010d7a457781bad9a3c5cb6847e64ddc2a0a1216f0f01b79c535544998e7eace85e085d644b76eb62a8b3fefd09d7bdb2b139e80df7b5cd4", shop_name: "pneunaj.com", shop_logo: "https://y1.sk/t/s/130x50/52071.jpg", product_price: "626,93 €", product_shipping: "", 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(){ pmaWidgetInstance63612ae4ac365ae3748c3146.initWidget("63612ae4ac365ae3748c3146"); }) function docReady(fn) { if (document.readyState === "complete" || document.readyState === "interactive") { setTimeout(fn, 1); } else { document.addEventListener("DOMContentLoaded", fn); } }