var pmaWidgetInstance6040c670d9685ed272e93de8 = { debug: false, baseUrl: "https://public.pricemania.sk", exitLink: "https://www.pricemania.sk/exitv2/?data=9fd6b72134d8eff89c358ff7dd05e6fd:2815651bbb315708d77da6750b91350040fc07d2d2ad8d6a6a9912b219de02001daa36fa68807b494439cc9908b433c8b9f8caa177c3674d3eefb30705b7cf11c3d1a0551f8fdbecc9dff561c7159d0e2a390da4476092f5cb72ecfc925afd5a816d80e51a7fd169dec5e7753b4fb5ffb8c4248c99da256ad43691cb8dcd0910ce798951abcefb1ac00b8d7ad696802e37fe501f47dca17e5b0625499cd2fb318e3a82316714d1aca63738b19b0eea781dbc1fc0fec902f980c34c1ce275d7a4", shop_name: "zahradnyeshop.sk/", shop_logo: "https://y1.sk/t/s/130x50/59055.jpg", product_price: "45,68 €", 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(){ pmaWidgetInstance6040c670d9685ed272e93de8.initWidget("6040c670d9685ed272e93de8"); }) function docReady(fn) { if (document.readyState === "complete" || document.readyState === "interactive") { setTimeout(fn, 1); } else { document.addEventListener("DOMContentLoaded", fn); } }