var pmaWidgetInstance634fcd76ac365ae374642480 = { debug: false, baseUrl: "https://public.pricemania.sk", exitLink: "https://www.pricemania.sk/exitv2/?data=083b2467fb70822515280fdd64ec752e:80f8f07eccdd723b92947327f9ff62a2cc26329e65a0c18ada34126fffa8d9bbb3e69e0f98a88a404459a3bffefc5add389dcb754bed46fd365300b58a414da1ed2c5b018c1136a0a38393167f90e3d5aaca14bb0af8edf3383f238931c6ea0b6ea7a78c14c6f3c0feec6259faf50006ba914e7c4b4678a376940c492dbfd0184164f9484c7c66fa46b82c8826d99cf389632046892010ce538211285e536d0063124064fe92ca71aa3cb5228115bbd1337ca2ee560b1fc01cc72d5e32cae072", shop_name: "boukal.sk", shop_logo: "https://y1.sk/t/s/130x50/5806.jpg", product_price: "569,22 €", product_shipping: "", 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(){ pmaWidgetInstance634fcd76ac365ae374642480.initWidget("634fcd76ac365ae374642480"); }) function docReady(fn) { if (document.readyState === "complete" || document.readyState === "interactive") { setTimeout(fn, 1); } else { document.addEventListener("DOMContentLoaded", fn); } }