var pmaWidgetInstance6030b852d9685ed272412574 = { debug: false, baseUrl: "https://public.pricemania.sk", exitLink: "https://www.pricemania.sk/exitv2/?data=c76646bfde5923a563905f093cadc611:8f137ef87e051c892fa5a7a646eafc51d0d64a74751dd1db5a2ba47d4582c6e25a4aa2793173ddac2517b32d5d8dc9752ca9e48ef93956e41879d86b74dd6e9a1c1acc6d002580a9670487476736fc3066bc96686628d6f3eccff42f1b09107a15b359b16b6c1126406be1daf336310afc7c807a514147e52892efa95baf6443c5be69bc54d3876595a1e29b63691bf20d7966f607becb0c6be60c7c61f1c67681fd8a43d5bbc3908fe638eff29001f1f7f84273b4b93cd502fe6e72ec30bc39", shop_name: "GalaxyMarket", shop_logo: "https://y1.sk/t/s/130x50/59525.jpg", product_price: "53,13 €", product_shipping: "3,50 €", 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(){ pmaWidgetInstance6030b852d9685ed272412574.initWidget("6030b852d9685ed272412574"); }) function docReady(fn) { if (document.readyState === "complete" || document.readyState === "interactive") { setTimeout(fn, 1); } else { document.addEventListener("DOMContentLoaded", fn); } }