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