var pmaWidgetInstance63ff4be242183289057e5459 = { debug: false, baseUrl: "https://public.pricemania.sk", exitLink: "https://www.pricemania.sk/exitv2/?data=3faa37be1963568e665a15c0bd68993a:56ab64a12675f2bbe8545538a1af43cb4362bb10423a4d6c965a1c7b632438efcd03631c0678556bce6332b21f21f86b7249a39b6567866000821d540d33f8782f9f45d2f1b00e0188fe4f7132efba397a9e28e9fe34408b799124267be66dec21700abab0dde3c30240a194b6e3ccb3e8be4fb15bfa6b2ca957005f7a3c435f470c2cb4b490dc4df43e54b31b71aba80a860b9760b6422aeb455903eaed0465a159345dd5fa8680d3803813a5c0ee6091f4e883f8561b215596c097c5ff8df10cede9fd870e4a40fa0c4ab2fb5f6f8b", shop_name: "arco.sk", shop_logo: "https://y1.sk/t/s/130x50/45797.jpg", product_price: "66,99 €", product_shipping: "2,00 €", 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(){ pmaWidgetInstance63ff4be242183289057e5459.initWidget("63ff4be242183289057e5459"); }) function docReady(fn) { if (document.readyState === "complete" || document.readyState === "interactive") { setTimeout(fn, 1); } else { document.addEventListener("DOMContentLoaded", fn); } }