var pmaWidgetInstance6076a0c4d9685ed2722bc80f = { debug: false, baseUrl: "https://public.pricemania.sk", exitLink: "https://www.pricemania.sk/exitv2/?data=7c53bcc61e234203f9a3437c14f66999:d431cda046b0ed05f79668f3743686a00e97c975a4f62b5b68c40c8d4d01a41e924b09cbb8b9062f318aeea15cc8bf023cb2eaf97ec5827d694ec8b4978d1fe58b1eace90fc4f9e5fc126189f76051a580c06fbd977e15654460571005f5ee7a408428ba8955ba510ae1316b9f7193c27de3975ac1bd9887f7b9452516e84eaef4643c7bc030543552b0b5de25cf5e11260b9e168cb422049b6988186f7c97cd405f02596f18b81c388cdf44a62e6f39b3309ba3e28f2f239ae5c154e0d902b2", shop_name: "Helveti.sk", shop_logo: "https://y1.sk/t/s/130x50/59442.jpg", product_price: "135,00 €", 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(){ pmaWidgetInstance6076a0c4d9685ed2722bc80f.initWidget("6076a0c4d9685ed2722bc80f"); }) function docReady(fn) { if (document.readyState === "complete" || document.readyState === "interactive") { setTimeout(fn, 1); } else { document.addEventListener("DOMContentLoaded", fn); } }