var pmaWidgetInstance63613329ac365ae374d04bff = { debug: false, baseUrl: "https://public.pricemania.sk", exitLink: "https://www.pricemania.sk/exitv2/?data=928bf59ba0bfe721ac82c242e0074a72:10e31145f029f8a03e541751d50f1cea753cfe01f1c4bbc1e55addae00efa5be3ca193854072a90d1574b01dbf1d1dc61845b905ecb02907c56c8fa26e4027f043989ca4cd01fbf61c52c42cd5ff836ef66057bd9675a7127e444de2ba1cf65ca46969003a502cb9de4aa1784b017b45111285417f4e800fc6d28209b55da4288895b7468b8523f7892fafc88e6daedfaed7c7a0a01fd2460b662406cdb12a915a08b691550f76c97e1c4e4d70e36e0f522174f3414e0a20e7261c3149287395559b1c831a9d1ecddd24bfa84d04e918", shop_name: "pneunaj.com", shop_logo: "https://y1.sk/t/s/130x50/52071.jpg", product_price: "262,54 €", 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(){ pmaWidgetInstance63613329ac365ae374d04bff.initWidget("63613329ac365ae374d04bff"); }) function docReady(fn) { if (document.readyState === "complete" || document.readyState === "interactive") { setTimeout(fn, 1); } else { document.addEventListener("DOMContentLoaded", fn); } }