var pmaWidgetInstance64fed7304218328905447bb8 = { debug: false, baseUrl: "https://public.pricemania.sk", exitLink: "https://www.pricemania.sk/exitv2/?data=2e7b0f27d2075ab128312a4b2dba38f1:0ef7df6b32c6f43ab4b95fd1ead2517b646c9ee01416999a75d53828d265f29279a1985c86eadfe565e5b3e87fb6cbff0c0a37763fb6091bde6886539b686aa529f29a9669f097abc44ed72145538080427ad69dea8cb58ee79c16a5558db957a59a6cbf02cd4eaf0f94ce74264a298b2956d5ca362efa081772421d38a87a27c3a6bab5ec0ddb49eac938bfbcb5280fcb6d0fe644137abab21f4aa0d2c85719c1cd1a13a36fbecec4f29bc3d6706c1276e44dce4eaad290bc2f6d1f73741844136f987794b9d7c67d79801837321638", shop_name: "bux.sk", shop_logo: "https://y1.sk/t/s/130x50/528.jpg", product_price: "7,90 €", 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(){ pmaWidgetInstance64fed7304218328905447bb8.initWidget("64fed7304218328905447bb8"); }) function docReady(fn) { if (document.readyState === "complete" || document.readyState === "interactive") { setTimeout(fn, 1); } else { document.addEventListener("DOMContentLoaded", fn); } }