var pmaWidgetInstance65952ee6ae16db3466b3e4e0 = { debug: false, baseUrl: "https://public.pricemania.sk", exitLink: "https://www.pricemania.sk/exitv2/?data=3360cdcd4f9935a26d9a24add1238e79:51faae98f7246cba540403d647fc0ae1241ef2919cbfec2636ee771801459c2813606d946a0fe5d8c9fc8305507fc06f1cbfe1ad059e118e159690d60483048fea2c3891901fdde181b51d5fffdc08ba90e914cc2893ce51a772ca9d753370d6b8d5831cf76203e19ee00a114fe7b6bd56606c99491e42eef764b2c167c8e164a80324c5807fd533d018375f6ae856a934b701933e67d7cd12e64a630adf974cf42c91d9daf81673ea97b62f99c7e66cf34ed4655ad580744141d3ebe98940a9ce97c0957bbf3d28b11e35bcacfd4698", shop_name: "MobilPC.sk", shop_logo: "https://y1.sk/t/s/130x50/46049.jpg", product_price: "998,50 €", 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(){ pmaWidgetInstance65952ee6ae16db3466b3e4e0.initWidget("65952ee6ae16db3466b3e4e0"); }) function docReady(fn) { if (document.readyState === "complete" || document.readyState === "interactive") { setTimeout(fn, 1); } else { document.addEventListener("DOMContentLoaded", fn); } }