var pmaWidgetInstance60c73eb70067a2ef598b8697 = { debug: false, baseUrl: "https://public.pricemania.sk", exitLink: "https://www.pricemania.sk/exitv2/?data=86274535d09f3b62e580aea000da3b39:09df6751435c0bef6fc03d7551abe5f360355eb9d7cad74e49ff5c074c5b55b8d4f6ec4d6319ef6a79fb0c8f9a1cc03e80c7edf56491162aab086132275963913c93b88dcc41bccd39e0e9d9eb2515ef0c1d1f43ac55a2effa7d5ddcfe0bd056e0ab30627fe044b447dd621abf26dae3ab7e64e9780ffd3e606087fdebfda1c81275f835dc3f1a32479669e63158339380f4972bfbc26ea61e2b7606509da18ab9ad5d24235d38ae12acaf8bc27de822b9cec2615e625f63774fa2db1b2aa1c20d12e076f619ef972a5ed84ef1038f44", shop_name: "alza.sk", shop_logo: "https://y1.sk/t/s/130x50/215.jpg", product_price: "102,90 €", 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(){ pmaWidgetInstance60c73eb70067a2ef598b8697.initWidget("60c73eb70067a2ef598b8697"); }) function docReady(fn) { if (document.readyState === "complete" || document.readyState === "interactive") { setTimeout(fn, 1); } else { document.addEventListener("DOMContentLoaded", fn); } }