var pmaWidgetInstance5fcdf410d9685ed2721c0971 = { debug: false, baseUrl: "https://public.pricemania.sk", exitLink: "https://www.pricemania.sk/exitv2/?data=7a3d4e188a4c9032a9a705e4f22b1e8c:eb020d5d4e17b970ba2e665f7e7c1bf874f2cdbaee20bdbf969ac818bf4691c0cd2ccad0da9497b0bbee27413f7423422eb7257660345c8d9676d5d86b1a162d10206632703468d926decce725792815e5c0817f3835960787544fe52cb386b5df5a1da2a7fc3d01ffdabc3ffe26cafb208dab6adc9d8644ef7fd8fb2efc9602ef2c4b5d07babf0fa2c3af9490e83bf8040388fd956720f71be1c0f4d38b062cd3cbf1c01abb7039e4965145652f38c228060b444e24c2a3fd0b7e51ec05a1dc", shop_name: "DAMO-Slovakia", shop_logo: "https://y1.sk/t/s/130x50/1493.jpg", product_price: "34,16 €", product_shipping: "3,00 €", 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(){ pmaWidgetInstance5fcdf410d9685ed2721c0971.initWidget("5fcdf410d9685ed2721c0971"); }) function docReady(fn) { if (document.readyState === "complete" || document.readyState === "interactive") { setTimeout(fn, 1); } else { document.addEventListener("DOMContentLoaded", fn); } }