var pmaWidgetInstance63579e43ac365ae3741f8471 = { debug: false, baseUrl: "https://public.pricemania.sk", exitLink: "https://www.pricemania.sk/exitv2/?data=aaf92da8de7dbf0a4e2077066c26a5e9:300966bfe31e7264badc3722afb6e31af3d5bc570fc7ed64eaae7b0332de3a24e8fd2167c3d11e9a8fdefabb25be01d21ba79ace5bf177a0d9a0b0d5b5b5f7d09dfc464e02ade08da451560eb5a1eaffdc79fec7142dc330f49f49bee09bdbb1b5b2e370483f3b2ac24f67311271fa56bab582867cd8246cc9ada72e936d558e150d3cc71d5cb443d5bd5da9e861852c8585eb1f859601c002d4dbe1f076b6bbfa5eebb5433169063041ea7f8c83e2b140fd1d0fc1699972d465b1f6ef71d097a225612958446c979e16e012e9985c57", shop_name: "KNIHCENTRUM.sk", shop_logo: "https://y1.sk/t/s/130x50/6810.jpg", product_price: "11,81 €", product_shipping: "0,00 €", 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(){ pmaWidgetInstance63579e43ac365ae3741f8471.initWidget("63579e43ac365ae3741f8471"); }) function docReady(fn) { if (document.readyState === "complete" || document.readyState === "interactive") { setTimeout(fn, 1); } else { document.addEventListener("DOMContentLoaded", fn); } }