var pmaWidgetInstance64d4d8df421832890560437f = { debug: false, baseUrl: "https://public.pricemania.sk", exitLink: "https://www.pricemania.sk/exitv2/?data=fa3a9e3b16846d01d170f6b169a2cee2:96bfcecf18823e425d067de1b01f032ebaf5e4f685a21624b0d0a6baf3ef2f6ccfb459459833868ed3c7fe0761e792c39a686470088948a6c2dc9d5780a1f34fb992c686de26f4636a86aba2ac637ae8c191e3a1628927bad46d9019b594584c09b4e6f959024d0e2b927c75d15cef8ccdf029eb3eaa68e638b045ec5033c5649d3a3f5a188de18b0f9ef22f58b3597e3be62fae5467369fedd252534f5436d727c2c128de181e5b8dfcf7f72afc851bf758a0c33104bf81faa46d147246aa8b46b5345b81862c210b8439c387890b5e", shop_name: "pomocnik.sk", shop_logo: "https://y1.sk/t/s/130x50/42713.jpg", product_price: "64,00 €", product_shipping: "4,90 €", 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(){ pmaWidgetInstance64d4d8df421832890560437f.initWidget("64d4d8df421832890560437f"); }) function docReady(fn) { if (document.readyState === "complete" || document.readyState === "interactive") { setTimeout(fn, 1); } else { document.addEventListener("DOMContentLoaded", fn); } }