var pmaWidgetInstance659bd06eae16db3466447070 = { debug: false, baseUrl: "https://public.pricemania.sk", exitLink: "https://www.pricemania.sk/exitv2/?data=fde02598eb6ad2d8f1a87219ebf6be30:6ef30cb047f300cd3b9a46dd91d266dab02e1cd7004c0a0da50102c02c1ae1484e7a0170c0e4698f359fffcca0d9879bb613ba52cab344020b6f8c493df445e02dc9c235abe7209eb6e0d8f18df54a8bdd74d31a4dbbfd615eff112e12933314302df780ae50dd0b372604a9d0f07c72b1552bd6b7dcc5dfe44a7d7b6786a600d9dad0c01b72739fc4fd4f2870dde5f029c4623576cc6f428d3b0c15fe78e5a22fd56f009bf9f269f9262cc3cc80c8a12f8b882062eae3493d0ad1e2495867ca3c82b2386a09b43b342e926e58830468", shop_name: "lacne-nakupy.sk ", shop_logo: "https://y1.sk/t/s/130x50/6164.jpg", product_price: "309,00 €", product_shipping: "0,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(){ pmaWidgetInstance659bd06eae16db3466447070.initWidget("659bd06eae16db3466447070"); }) function docReady(fn) { if (document.readyState === "complete" || document.readyState === "interactive") { setTimeout(fn, 1); } else { document.addEventListener("DOMContentLoaded", fn); } }