var pmaWidgetInstance63f9d9e542183289059c824f = { debug: false, baseUrl: "https://public.pricemania.sk", exitLink: "https://www.pricemania.sk/exitv2/?data=bc6345ce9f17caa26f4fcbdd8fc4bb44:aad0eedb2e70ee35e4eb205bbd405032bcfb1eadc5a6450504ccb5b4fde42818f7b7b9b1956e49b58a7f424dbddcd44559dff04075b8c02230ba72132a509612c4ac9a8e4086f1f917afb308cf1875f7a3787ce25e9dc54b74a7cbcb77d539ee8911f734d513e6146c97ce2339a4f5c858d41a4c5e568198dea0bbec9930d3518f84a09d77527bc2761584a7319714f238c096c3af9ca3c3b30a200a2a065697701e9521a9c2d10bf1e1346868fc49b07ee2cf5cee9828949c02ce126141eec7a24ba74efadec59f50d8ad0a3eca2258", shop_name: "alza.sk", shop_logo: "https://y1.sk/t/s/130x50/215.jpg", product_price: "87,16 €", 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(){ pmaWidgetInstance63f9d9e542183289059c824f.initWidget("63f9d9e542183289059c824f"); }) function docReady(fn) { if (document.readyState === "complete" || document.readyState === "interactive") { setTimeout(fn, 1); } else { document.addEventListener("DOMContentLoaded", fn); } }