var pmaWidgetInstance5fbfc80ed9685ed272fb6325 = { debug: false, baseUrl: "https://public.pricemania.sk", exitLink: "https://www.pricemania.sk/exitv2/?data=3977a75f5d948e89e119de049a63c473:1f1fca5288b5c4291985f81d5b6249463b073d2ee80af001bd050cb2ed2064b333c26a8f96b0b29bf73f5a2597d2d40cd429314794e1f8030555bea1c3cee841c09ee0d4dcb4c41047c66e29ae24d2a0f018d85829bb06aedb1afaa663827fb1691aa71b196b20dccb0c5fdb585c92b608d02bba93173b0e82aea84df26cd41fca4f5e7e4e8910f8e8070594338c0b32511beae9ae8d54cfb08a7d783ae4f492d824a3ac94207b9bdaf67952e448358bcad796b218f090e369ecd27196ff9a76", shop_name: "GalaxyMarket", shop_logo: "https://y1.sk/t/s/130x50/59525.jpg", product_price: "61,68 €", product_shipping: "3,50 €", 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(){ pmaWidgetInstance5fbfc80ed9685ed272fb6325.initWidget("5fbfc80ed9685ed272fb6325"); }) function docReady(fn) { if (document.readyState === "complete" || document.readyState === "interactive") { setTimeout(fn, 1); } else { document.addEventListener("DOMContentLoaded", fn); } }