var pmaWidgetInstance6037affdd9685ed272609757 = { debug: false, baseUrl: "https://public.pricemania.sk", exitLink: "https://www.pricemania.sk/exitv2/?data=726ab85e14ea9b2b7e7879794d2db26f:ea68c4e3b0939d6cf48b81c7392044d4e4494be90b584448c8d747def8815f7ba71f8d7d56089776e7b95c72228fbbdcb0c49bf7870be4ba2389042e6e4d61fe90ba60b5092c50aeeebbf1da2fdd1dd29e73003f7e9ea5c22e4a831c8dc09589519f2788fab29f914c1950103cec37c4b060ca4be6c6537df221984753cf5dffa93a47f8beb54026aa4c82b6fe8b7e81f215b8284484439dedf136eaa3d1cccaffc49be34306b52969bbd6d5bd1bc9e131b03902d89898902aa3a17b842c3836dc4f95683491f5f69c6f09876b0e8d57", shop_name: "najlepsiemobily.sk", shop_logo: "https://y1.sk/t/s/130x50/60405.jpg", product_price: "704,00 €", 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(){ pmaWidgetInstance6037affdd9685ed272609757.initWidget("6037affdd9685ed272609757"); }) function docReady(fn) { if (document.readyState === "complete" || document.readyState === "interactive") { setTimeout(fn, 1); } else { document.addEventListener("DOMContentLoaded", fn); } }