var pmaWidgetInstance60505cedd9685ed272e67a15 = { debug: false, baseUrl: "https://public.pricemania.sk", exitLink: "https://www.pricemania.sk/exitv2/?data=75173902e20f953337c55dca24cdc6c6:06854df5483e345087d91c6837d8cd05016dab6ab8492d09668b88670294e32b9d8e7702fb176f1be3fc18600d669e718339ecb1db75409eb00fa5fe9470118d5535967b7e96e840015533f15aa1c01485ef60e5e9e98417915c975379b790aee64acb467d8976932bf19fc60726599f1230f3d235fb73e81924b38ac4cfc2756fa2e1f2d6c599a60d9a97f39397ad96fc163ae359f8b0258cdf9698702d4c12630e013aba78ef539f18e9240aaf60b66f4ce6c0c35bd9384851f02fbf09d834", shop_name: "pneunaj.com", shop_logo: "https://y1.sk/t/s/130x50/52071.jpg", product_price: "72,73 €", 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(){ pmaWidgetInstance60505cedd9685ed272e67a15.initWidget("60505cedd9685ed272e67a15"); }) function docReady(fn) { if (document.readyState === "complete" || document.readyState === "interactive") { setTimeout(fn, 1); } else { document.addEventListener("DOMContentLoaded", fn); } }