var pmaWidgetInstance65952fb7ae16db3466b67244 = { debug: false, baseUrl: "https://public.pricemania.sk", exitLink: "https://www.pricemania.sk/exitv2/?data=5828b60f8938c0637c8020297b65c0ce:6842e77362391fd90a1787fb2e06ad1a563a4cf849a7c6f9a594c6fb9a2b41553d2ab7c35b855acde91c25e1a60d626b0d4560e23f7128b4d33cb3ebe92417f4a45409591240010416847a59b14c20aa2e0aefee9000a8c3d04047a9c77fdd7a39f8719302c5f6ddf3f1e7d57b336c44d659a1ebb1db16d6fa58d3ee54e1cb4396a1daaf66362cf83380ef4c2df03efef6031de960a2f4887d88a1501b66b4250ac250ded6ccb2f655b04f1f287d3a44d770fc35a5715a832abfaa0aa415fb023c557b7e93c01d7455d4ea961c1620e1", shop_name: "MobilPC.sk", shop_logo: "https://y1.sk/t/s/130x50/46049.jpg", product_price: "796,90 €", 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(){ pmaWidgetInstance65952fb7ae16db3466b67244.initWidget("65952fb7ae16db3466b67244"); }) function docReady(fn) { if (document.readyState === "complete" || document.readyState === "interactive") { setTimeout(fn, 1); } else { document.addEventListener("DOMContentLoaded", fn); } }