var pmaWidgetInstance5fc9f513d9685ed2725f5cb3 = { debug: false, baseUrl: "https://public.pricemania.sk", exitLink: "https://www.pricemania.sk/exitv2/?data=32e37133f2d493fb86fa2b5ddd58f6a3:00e7398750360e19b0a03b2d5f4c17c02f0627c585441d05fd3574630c71189e3cd267df4a408b5643b7d9b547564416bfa1288d55c7943f6fad93f382442263cba0ffc9bf45ad1529f1cb309a6e3ede9b122f9ff7a39e232594bed18b59a38e109dc0e7975ef867b5040978256fcec28f38effc063186005481077ce6b18f5c3ac40b4001572908f35a0088df613651ffda4fa78a968d6b54c48aefb4adcf712999131d36db46220ab445a8c2f8b61d1669660e212983ba1f6e4fe7961ac800", shop_name: "Autovip.sk", shop_logo: "https://y1.sk/t/s/130x50/56575.jpg", product_price: "21,96 €", product_shipping: "2,50 €", 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(){ pmaWidgetInstance5fc9f513d9685ed2725f5cb3.initWidget("5fc9f513d9685ed2725f5cb3"); }) function docReady(fn) { if (document.readyState === "complete" || document.readyState === "interactive") { setTimeout(fn, 1); } else { document.addEventListener("DOMContentLoaded", fn); } }