var pmaWidgetInstance64d4e74242183289058d2960 = { debug: false, baseUrl: "https://public.pricemania.sk", exitLink: "https://www.pricemania.sk/exitv2/?data=341fe22c0155be1f92bcc74bd8177613:84255c90a8414a2de384a6c72527928803ce3af6e9192439f7d2e037d2f2aa6707e254e9874430ace0e77e1e81ff7e4bbea0146cda4a78469ce7888cfbb7197b859301243a71b8bbac9e2344b169ba79163328b3311180a807bb93858afbae520d38859a64f8d7c04198e8c6818a7f49dd15bc8f932a847ee97f45dff490f3e6b22abc06bf5582f67a467852068fea67f8ecf9c27efc6d896ebf2a0594d07f747b347033622a0be961f8fcb11c67f31339a3b0f73900e05ef62cc5c2baefbc5932becd7e883ac1f7c95ace3ba6b0e57b", shop_name: "GalaxyMarket", shop_logo: "https://y1.sk/t/s/130x50/59525.jpg", product_price: "307,09 €", 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); } }