var pmaWidgetInstance5fce1aefd9685ed27261d056 = { debug: false, baseUrl: "https://public.pricemania.sk", exitLink: "https://www.pricemania.sk/exitv2/?data=3f6d634e00ac88c7f79b4e3332cb7769:8e0d93544601d656edd198f04835b3995d58cf0cbc666f7c7fbe304702a17e3e5d8a8ddfe34a03bc7e7b27b7fdb293515554ef332617c9b3d8557350839d5f1dfae1fcc3539f18b46d3023700f6b3e23e1d0e2a810771584885c80562537f5ed62792bb3aa420b8b9e8c9ac5608b379791df49cd9622233686b4b71d4ab85b15abb4f438aec0c7b929591f6a0031666abc694b5d79d01a5d930cf1cb4fa546eea2442c1474e66ffa5821627a858840d615a044c469ae72bb9999ce1a052de301", shop_name: "Extranaradie.sk", shop_logo: "https://y1.sk/t/s/130x50/6646.jpg", product_price: "21,60 €", product_shipping: "", product_availability: "Skladom", 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(){ pmaWidgetInstance5fce1aefd9685ed27261d056.initWidget("5fce1aefd9685ed27261d056"); }) function docReady(fn) { if (document.readyState === "complete" || document.readyState === "interactive") { setTimeout(fn, 1); } else { document.addEventListener("DOMContentLoaded", fn); } }