var pmaWidgetInstance63f8a9994218328905155285 = { debug: false, baseUrl: "https://public.pricemania.sk", exitLink: "https://www.pricemania.sk/exitv2/?data=9d0d21cff64660c80cc84cb261d135e4:d545b49a3ee084715144a83caa061a7f666a5d5e1863e881de1ed0fd966180dcd3a79c4b31b089e63b83c58fa62e8575e504a2d17e2eca466bd046e64fb956d68725e6a9cf8d53557f05d6d219be29d688502c921b34448c465ec58797e1b695c15fb46e9319691b230047f1021f33f685ec848c3645b0f763459a141f47a7519bdf75ee93bd7f27ecd428db53fb396e3e371ccda85a2ee665a4c13ef41a3446c5f7e920313f6671c78895cffe442c81f0e98be88d828d632f4becbb039407c83d24c06e4bfeb483325aad9a8687cbeb", shop_name: "GalaxyMarket", shop_logo: "https://y1.sk/t/s/130x50/59525.jpg", product_price: "202,56 €", product_shipping: "2,49 €", 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(){ pmaWidgetInstance63f8a9994218328905155285.initWidget("63f8a9994218328905155285"); }) function docReady(fn) { if (document.readyState === "complete" || document.readyState === "interactive") { setTimeout(fn, 1); } else { document.addEventListener("DOMContentLoaded", fn); } }