var pmaWidgetInstance60c7528d0067a2ef59ac5659 = { debug: false, baseUrl: "https://public.pricemania.sk", exitLink: "https://www.pricemania.sk/exitv2/?data=8f90cc95c18ad8b9504d29716e65d87d:ed1e738cd79f54887c9a3274aad372ce620f5c6ed4b3338084dded951442c83f4c973832e1c1441cf6c340f6b5f503f68f90e3a7dd4b6978d16061f7dbbac638dfd9d4ec1255cb87fabe4b7811469b845135976fb7230623066dc032f410adadcc6ec09a4eb5688a428e5e615f8ae3999ab70d868c1ee6a034fce4c88e7ff387cf034fe493db9d12d717b924cca569fbb7049ed677f57c61c964e1c49f3e3327e4d3ecdaf73f368cac462f6c4a7ca7d1a124b80dc989193a4687ab6c980f56b5a139d1b192cfd7bb84ecb8faecaff5f0", shop_name: "alza.sk", shop_logo: "https://y1.sk/t/s/130x50/215.jpg", product_price: "334,29 €", 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(){ pmaWidgetInstance60c7528d0067a2ef59ac5659.initWidget("60c7528d0067a2ef59ac5659"); }) function docReady(fn) { if (document.readyState === "complete" || document.readyState === "interactive") { setTimeout(fn, 1); } else { document.addEventListener("DOMContentLoaded", fn); } }