var pmaWidgetInstance61321b6c0067a2ef5940adb0 = { debug: false, baseUrl: "https://public.pricemania.sk", exitLink: "https://www.pricemania.sk/exitv2/?data=145015b7ccd382f756977f7eeece3e53:46944940dc64f2e04908ff88120cea2666fc5f943f3f670fba12a575a0b965786477af8cde0192732fbee9dfc717938189e74d7aab33ddd7b5e7f6567591a98321963011d57292d55cf1ab8f6369cae1e0ac541a8559afc2b77ae949f7551e7bb0d9f36217ff21dddda80ac80e92bd83a960458cbea976ed26f22747863ae7faa3ddd064fdc2644cd2004b0328e88fc07df8007658a156bb4cc6a7cf19271986b7815f92132025ccb4fbb80cee6b58bff2ac7e07049d186264681fdd6479f308", shop_name: "MobilPC.sk", shop_logo: "https://y1.sk/t/s/130x50/46049.jpg", product_price: "103,00 €", product_shipping: "3,90 €", 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(){ pmaWidgetInstance61321b6c0067a2ef5940adb0.initWidget("61321b6c0067a2ef5940adb0"); }) function docReady(fn) { if (document.readyState === "complete" || document.readyState === "interactive") { setTimeout(fn, 1); } else { document.addEventListener("DOMContentLoaded", fn); } }