var pmaWidgetInstance5fed624fd9685ed27286368e = { debug: false, baseUrl: "https://public.pricemania.sk", exitLink: "https://www.pricemania.sk/exitv2/?data=ffa1ca14ab17a6260cb125170ed5e0d6:4935036d4ca5a92bdd1a11a803c7d43d83f92c54b80eca0bdaca8794a2ee8f6da452655a7c8a8301c8d34eaa13e89b426f5813c307daeb23011a71757670365208ab4f3cb654cf8d3d89c6692da355d1be0842f11724220f715d0bcf80facadcff2fe40bc528202e835adab56b849864bb80461051551e7701fd755f268b31ca684e56307f0fda0a941975d2cbccfaeef6c1785c4f8e9a8b6e11c477a2cd7098539aa42fd79c38539997b03109075af5045ee9f570c6cc41eed05df0a214ac4222a25dd305c5424cb375269707c19bf3", shop_name: "predomyazahrady.sk", shop_logo: "https://y1.sk/t/s/130x50/47035.jpg", product_price: "363,03 €", product_shipping: "", 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(){ pmaWidgetInstance5fed624fd9685ed27286368e.initWidget("5fed624fd9685ed27286368e"); }) function docReady(fn) { if (document.readyState === "complete" || document.readyState === "interactive") { setTimeout(fn, 1); } else { document.addEventListener("DOMContentLoaded", fn); } }