var pmaWidgetInstance64d4e74242183289058d2960 = { debug: false, baseUrl: "https://public.pricemania.sk", exitLink: "https://www.pricemania.sk/exitv2/?data=bdf1e5e7b3632c6648c11853655d9321:467afc55f5f0f0dfeae3fe70c9b8d25850cc9f9653870b8f7272f03467c096fa5c136155849ba5d4065c1db3b1354c94c5e8ed681a5df5678b4060132fa6b0d22ae9e60c1f22d80af6a7a7ab9689c782febab297c29e0f5e5a92c115c4a2d9b1e9432ad95c510c304061d472084dc01ffae2d8d8b1a22b13e243f52da2de969399face4e11c849ab97a812b37334760507b3a7a9ae6a474ddf6c862fe25fb499aef025f7df4c17444eb3d5d24ce52635ed10e3fa1b7ed07b84a901fb52117d5f6df8f0f4f00faa0981bc5159589531dc", shop_name: "GalaxyMarket", shop_logo: "https://y1.sk/t/s/130x50/59525.jpg", product_price: "307,12 €", product_shipping: "0,00 €", 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(){ pmaWidgetInstance64d4e74242183289058d2960.initWidget("64d4e74242183289058d2960"); }) function docReady(fn) { if (document.readyState === "complete" || document.readyState === "interactive") { setTimeout(fn, 1); } else { document.addEventListener("DOMContentLoaded", fn); } }