var pmaWidgetInstance60c744c10067a2ef59947777 = { debug: false, baseUrl: "https://public.pricemania.sk", exitLink: "https://www.pricemania.sk/exitv2/?data=9da3bf1963f196d9d65edc493ebb3632:26a6524b023902970b27c1467c377bac826047d8d896948e12305deb6f8b55a7e18f1d316891fdf7c7b1c51119199efdddd02bb19d7b92600f4c90c96922aa9f568bd681d67d3c6f381aadeb65c1eb485b88d54127a020ee60b2e480a7c2b850b52e9b283da305ac3c314840c6b11fa593472f90d2f3c59dc04a8e28b550a6b719ef8320c1a1d3098a5438ed634a3a994e6af0fd5039729c780035215e10da70ea4fba8fbd6cd420deea9eac0c5359ce3c587072d620eceb494ec2d5cdf1bd87", shop_name: "Šimek.eu", shop_logo: "https://y1.sk/t/s/130x50/58202.jpg", product_price: "164,11 €", product_shipping: "5,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(){ pmaWidgetInstance60c744c10067a2ef59947777.initWidget("60c744c10067a2ef59947777"); }) function docReady(fn) { if (document.readyState === "complete" || document.readyState === "interactive") { setTimeout(fn, 1); } else { document.addEventListener("DOMContentLoaded", fn); } }