var pmaWidgetInstance615d63550067a2ef59828796 = { debug: false, baseUrl: "https://public.pricemania.sk", exitLink: "https://www.pricemania.sk/exitv2/?data=b366cd1c95d7c854ca1af06e31139cf6:b1f77a0915e670f3eefd57d01d65d1e094759703c2835ebd9b0dd3e5b481cd0baea4ddf93103e575e3bbd8c92b6fc54b8aa5f03283afec9067c8981f1be4966e57e1aed32bdedeb52ecbda4016da1b0b5304d9884d80b1f828c5454de51c1c2b47b76a13bed15020d7f6268917050ec0bea489a219c3c876ae7feefb3aa91b88976c5b78aaa5b851195069c89b17eea1175c0e6bafedbe281f552c8a25a966138160e78620056c207d4a20201a490b629991875f1fe97f5bf887062a564fb07c", shop_name: "exkalibr.sk", shop_logo: "https://y1.sk/t/s/130x50/49853.jpg", product_price: "218,02 €", 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(){ pmaWidgetInstance615d63550067a2ef59828796.initWidget("615d63550067a2ef59828796"); }) function docReady(fn) { if (document.readyState === "complete" || document.readyState === "interactive") { setTimeout(fn, 1); } else { document.addEventListener("DOMContentLoaded", fn); } }