var pmaWidgetInstance6059dbd9d9685ed272d8b490 = { debug: false, baseUrl: "https://public.pricemania.sk", exitLink: "https://www.pricemania.sk/exitv2/?data=b43c2269b30d9cb0e4075fc2317e616d:a3732acf43d5c40be979d945fa28283709582a0823aea2197710732e51d3bca6dd17993d5703e838a9d9e291d41c2d14c4348c55b709b9a04242bc80f5dde1d7ec2074a614555e03c591a4533e25c813e6adbe2bf968b6a17287f3f3c6fee75203d7d4ad79933011a6b144064c060953f7a2bd73da675d3c8bd474f11aa204a2ed9e0a61f81a36c101f96f7958aae966ec084d26a88d27b4c2f666c6e0d4ab5e87d3b1546c568d3dabccebd7c49d7634a79c0713b1760aa2d3ba6d50a94bb8e44402539ecebe442a574b5f95794ed1ef", shop_name: "alza.sk", shop_logo: "https://y1.sk/t/s/130x50/215.jpg", product_price: "822,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(){ pmaWidgetInstance6059dbd9d9685ed272d8b490.initWidget("6059dbd9d9685ed272d8b490"); }) function docReady(fn) { if (document.readyState === "complete" || document.readyState === "interactive") { setTimeout(fn, 1); } else { document.addEventListener("DOMContentLoaded", fn); } }