var pmaWidgetInstance602e6861d9685ed272e1fd5c = { debug: false, baseUrl: "https://public.pricemania.sk", exitLink: "https://www.pricemania.sk/exitv2/?data=5b915810ca19e0cc7669c6fa00f7e9c8:b95b9b853e0788b5a29bfd8ae065984c5763b6e036938393ef9c995b79be65ce4370e7db5dddee35d26fb24b9a47c3be1ffb2c418ffb629ef3bb72796ef04bf9bb11b58abaecc2419a3ee609106c96b40ee00436d8d93f1193c34fa1f553328f50641cc57b3b4baea23b52c669247aaced8f125e734818e9022b3a6c1c42e4d935d210416ba59c81bdb0a823075de1f35472a8c7df7cc7bd346e6d80e50a28efebfb7d5d9fb6b32cebac71b76914779b6ccccf55549fe0ea82fac24bb3604a51", shop_name: "exkalibr.sk", shop_logo: "https://y1.sk/t/s/130x50/49853.jpg", product_price: "206,28 €", 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(){ pmaWidgetInstance602e6861d9685ed272e1fd5c.initWidget("602e6861d9685ed272e1fd5c"); }) function docReady(fn) { if (document.readyState === "complete" || document.readyState === "interactive") { setTimeout(fn, 1); } else { document.addEventListener("DOMContentLoaded", fn); } }