var pmaWidgetInstance63f8a9994218328905155285 = { debug: false, baseUrl: "https://public.pricemania.sk", exitLink: "https://www.pricemania.sk/exitv2/?data=aa8bcce57fc7d4cf60864dc708a44f52:fbe77576c5a0494b1fecd88fa8cf837d36e57a98ced59e7535369d29a7f68a5761e831d75e45f42da9c9cc4ea44ed368bbe283d829fab9ddba7bc236b89c770e4baf858f58a9b0ef6f48c7995fa44b8a07d1e1b1aacc04241f4db6ff29158f24cc88f6ab722e66284f21df5c1b187cf2fd05c43d8c941a1d1736552e88e36cf7b5add21cec9b42b69a286831afacd3979ba07f2555f5a5ade7f641136e74c7e539d2f170a633c16763fe2796f1c39642de08d732383061f731ae9a8bfb471d069548f0b30d39a03801c6b9c8b7246fab", 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); } }