var pmaWidgetInstance6076ac80d9685ed272767e6d = { debug: false, baseUrl: "https://public.pricemania.sk", exitLink: "https://www.pricemania.sk/exitv2/?data=bae62a7487dc7d95924827e6bc2af60d:07291ab0e5cad7a402267064362a1683e44898d76f28447e55f11d6696de793c2c911cfb5005b0a76a26f2358f1e47d6ec0f954f3f8b7cff9480409f93e9536b8b30f0e5453ec5985cfbef523b5b3430dc18dcd6948fdf1e7abc632d3add95c7c60459e4b59870477db339f0464e7e751917c276e53a81019bd2f52cd4a263003f2b57c5b1fe4599876b200e4a94bb581be01ff089f9fd8454f0aa07477f64ca64463868614cbc82ef4a04d673a40fc41f7c361408d6b8ca15b5c576de00de138df2a7ac6a88c2c008c7ebeda92c317e", shop_name: "alza.sk", shop_logo: "https://y1.sk/t/s/130x50/215.jpg", product_price: "537,90 €", 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(){ pmaWidgetInstance6076ac80d9685ed272767e6d.initWidget("6076ac80d9685ed272767e6d"); }) function docReady(fn) { if (document.readyState === "complete" || document.readyState === "interactive") { setTimeout(fn, 1); } else { document.addEventListener("DOMContentLoaded", fn); } }