var pmaWidgetInstance654ccfc04218328905254e0b = { debug: false, baseUrl: "https://public.pricemania.sk", exitLink: "https://www.pricemania.sk/exitv2/?data=f30572fd016b87fb438ea7380866e938:2c1bf6df4d7c201316863676c5f11242c34c93ddb848714fd4022233a315d80a60da7401040cc0a7170d8ac5544a04cc941b5095e4d613bdd379aaec9e4806c83c8cbc396feb2763d13ed422ed889ed9ed1d1e9d5112640e99469f9ca47b264ee459047ab4dd18e006efcae76d266a4fbeee7b70644fae33693ac4b17daa69a2630d32fa19a36adba612afffad32daacee94121f2e4d2c9e94ad7a79cc6d08e34a1732e6d3c3e795afc80401b75506cc3573f37b2a56c1aaa64c4b56b33b3f5834dad6e5e419231785e9e75baf912dfd", shop_name: "KNIHCENTRUM.sk", shop_logo: "https://y1.sk/t/s/130x50/6810.jpg", product_price: "11,16 €", product_shipping: "0,00 €", 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(){ pmaWidgetInstance654ccfc04218328905254e0b.initWidget("654ccfc04218328905254e0b"); }) function docReady(fn) { if (document.readyState === "complete" || document.readyState === "interactive") { setTimeout(fn, 1); } else { document.addEventListener("DOMContentLoaded", fn); } }