var pmaWidgetInstance603e087fd9685ed272abd012 = { debug: false, baseUrl: "https://public.pricemania.sk", exitLink: "https://www.pricemania.sk/exitv2/?data=d0275fdfd1ae218fa3de36c8a954cffc:b1e6467194b6623314ff9a2080cdd612d86c80b4c16ee0d777ccf416da9f32f59953db7dcab90e3f77f0dc86cb400b59dfa7189ee87a7d0ddede876734d21115b0a92e4867403fd6a3d0eed69f4403bc465b7961516a7ce4d198c7615e4e9b840d9c0f37e747c3c839f173a25ae1f6d63272196ee3b7bf4975f60b824e6ba017e540af86e9afc0d86fa57bd113bbcd6caa0ea99833ec50ff9522b6a08f4878fc370d7c5bf2cd366ac73bf6705a0f75dde2f2dd81e011c7f1f74dd9b52af6de14", shop_name: "Arada.sk", shop_logo: "https://y1.sk/t/s/130x50/59720.jpg", product_price: "10,46 €", product_shipping: "2,29 €", 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(){ pmaWidgetInstance603e087fd9685ed272abd012.initWidget("603e087fd9685ed272abd012"); }) function docReady(fn) { if (document.readyState === "complete" || document.readyState === "interactive") { setTimeout(fn, 1); } else { document.addEventListener("DOMContentLoaded", fn); } }