var pmaWidgetInstance63579684ac365ae374e33e8d = { debug: false, baseUrl: "https://public.pricemania.sk", exitLink: "https://www.pricemania.sk/exitv2/?data=7f73e23cb925e2459ba8b1183987829e:3695db14dfa743f360281f971f089fb61ab84f37f3bb398f4d0b996add726fc6ee7460ef74e31499c700381003325d92ac308cfc27b1b45273bbf709f5bf3eaf43a1df400e1f43e93b078fdde34eb53b14cccd1da12beb1c02617a523047a2c6adf478259e14c55c2d319be4c240737970d1c2f7765fb5dbb9221a7141c640ec921427a94bd0cc34649fdf3713f3a0cef68aec4cc23de9015a3aed1308c9413353da0e62a3ac6261d70ab92730197445b69bccc932d12a28dd6f4dd4959467a6b178456f7ece91d14c98c852f8a799b4", shop_name: "bux.sk", shop_logo: "https://y1.sk/t/s/130x50/528.jpg", product_price: "13,29 €", 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(){ pmaWidgetInstance63579684ac365ae374e33e8d.initWidget("63579684ac365ae374e33e8d"); }) function docReady(fn) { if (document.readyState === "complete" || document.readyState === "interactive") { setTimeout(fn, 1); } else { document.addEventListener("DOMContentLoaded", fn); } }