var pmaWidgetInstance6022c80ed9685ed2720f80a2 = { debug: false, baseUrl: "https://public.pricemania.sk", exitLink: "https://www.pricemania.sk/exitv2/?data=60c83431a71ba124226976e34f13925b:8604c94e231b66596d1a5ce465475c3ec2990e433114242c94245bc4a54656adc9c400bb68153c2c8c6ba458908ad72c686d9f3c425ad3f9a4c107042a9825f29d7208ba3959d8f19770a395b47c603952f489e7bb0d7f1f9ad06b881694997d590ec37fe3d045390ba52f48f402b013f56aad635c31033fad82a92159af27a6b19c86fba36d317caf2a7d1a8c400e8577c6552822ed56edd2c400faf75c364615a2e1dcf4f8de7685339a94b92c618ada913eda18d35107e821770437734678", shop_name: "Extranaradie.sk", shop_logo: "https://y1.sk/t/s/130x50/6646.jpg", product_price: "199,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(){ pmaWidgetInstance6022c80ed9685ed2720f80a2.initWidget("6022c80ed9685ed2720f80a2"); }) function docReady(fn) { if (document.readyState === "complete" || document.readyState === "interactive") { setTimeout(fn, 1); } else { document.addEventListener("DOMContentLoaded", fn); } }