var pmaWidgetInstance611d524b0067a2ef597c8984 = { debug: false, baseUrl: "https://public.pricemania.sk", exitLink: "https://www.pricemania.sk/exitv2/?data=7c7ed46c7af002a675e9ea70f9a13463:db6abdb5aa95db498fc032baeb78e6980cb70c93d377b10226aa26470c52bbb886a70767206cfbbb9ea3f3120e7bc65668202845438611b184b4e849e78a50e3f1d2404387739d7d8176a6d58b52ccc8ce17d58fc3360ae4f7957291a4388e396f3982c46e7a3b234947f35db20fed596366a86bed27065fdc1230c7568325b486638654c8a885ace36086165bd20f57a9ba7da2356586137d6abcce8890d4cae7a3c61c97ec3c5ad7d9615345c16ce423d580f7b5000e87b3d02b12dd742758237a3ad10057d9d3b662b39f4cfe3a66", shop_name: "najlepsiemobily.sk", shop_logo: "https://y1.sk/t/s/130x50/60405.jpg", product_price: "704,00 €", 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(){ pmaWidgetInstance611d524b0067a2ef597c8984.initWidget("611d524b0067a2ef597c8984"); }) function docReady(fn) { if (document.readyState === "complete" || document.readyState === "interactive") { setTimeout(fn, 1); } else { document.addEventListener("DOMContentLoaded", fn); } }