var pmaWidgetInstance602e687ad9685ed272e220e3 = { debug: false, baseUrl: "https://public.pricemania.sk", exitLink: "https://www.pricemania.sk/exitv2/?data=39669ad3d0b8fefb5465bc8bc793a28c:35f841e2946b0a965b799c3a6c46131d07714e42606ac019df2109d2045574f57efc79dd536cddf901a974175da7230b06e38c42b3bbdf209d1e6a3d918128a9c9ee6fb86c1c25547af5a266b47b0f054d8bb90c39b59bb623210902df991ab0ec85f7b4d57ddb55fc25972600ffc1b3a19085d93b0d5b036785ca3c2748d74260ef73c456af2c23feea1dc892a677ce42a60eba8afac77307738d51d3971c9f0fed94d269d1234c11ba0a34b3ad0f415e41e8e7053f9306844cbc115697d1e7", shop_name: "GalaxyMarket", shop_logo: "https://y1.sk/t/s/130x50/59525.jpg", product_price: "117,52 €", product_shipping: "3,25 €", 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(){ pmaWidgetInstance602e687ad9685ed272e220e3.initWidget("602e687ad9685ed272e220e3"); }) function docReady(fn) { if (document.readyState === "complete" || document.readyState === "interactive") { setTimeout(fn, 1); } else { document.addEventListener("DOMContentLoaded", fn); } }