var pmaWidgetInstance602fca81d9685ed2721a3305 = { debug: false, baseUrl: "https://public.pricemania.sk", exitLink: "https://www.pricemania.sk/exitv2/?data=74bccba06d27aaaaac29efcb6f046136:4aca22611471a7f38dfa5c62c1c61f7f3e3b65db18a226c53d92423d05c651af147b342110bd952cb8f90dbd7e09604194ec726476107243b420afc686dd3f3093c437ae71fe0647d828abe99fabe970794e686310d91e11176d72f08e5ccfa9af442995caac60e0609c0f71b674aa7e8ee41a98d8c6a77212132e17c87b1bd550dfc26eda002e8034554da43cf012b72c97ace7e80022085c87f59826b26762c3de8220f6fc645da705c833a184684ae893648687ff3f97abbfabf400e542cad5299eeb8cd152f7c0b1556c842ac81a", shop_name: "antenka.sk", shop_logo: "https://y1.sk/t/s/130x50/59415.jpg", product_price: "375,00 €", 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(){ pmaWidgetInstance602fca81d9685ed2721a3305.initWidget("602fca81d9685ed2721a3305"); }) function docReady(fn) { if (document.readyState === "complete" || document.readyState === "interactive") { setTimeout(fn, 1); } else { document.addEventListener("DOMContentLoaded", fn); } }