var pmaWidgetInstance60ab2eb00067a2ef59dc7853 = { debug: false, baseUrl: "https://public.pricemania.sk", exitLink: "https://www.pricemania.sk/exitv2/?data=cfba64b93f3be35899a5a9881e558641:0154e22333aee2a05990ed965603c312d3dd4882b8597110b795cf848719af53ce15f5cef75f0912702003dcd0b2e137f56f64354c0ec441d1403c3428f16906ed55de2180b7c0c349b41c7a6d86e5391df462ea79fdb9897c60c9d545065816a851c3b4bb3b31f2130dba8fb6edcd9fe16ad85638d754158e8511d7e679cd5864a7bbd374441a4f77c093f8c3a4f1a5b8b24d7d901098f0faa8bab27c6133c877ac6d0c482a606c915bc98aee7001454d8ed19efa418bc2c159574d43877892", shop_name: "Odpudzovače.sk", shop_logo: "https://y1.sk/t/s/130x50/59075.jpg", product_price: "49,90 €", 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(){ pmaWidgetInstance60ab2eb00067a2ef59dc7853.initWidget("60ab2eb00067a2ef59dc7853"); }) function docReady(fn) { if (document.readyState === "complete" || document.readyState === "interactive") { setTimeout(fn, 1); } else { document.addEventListener("DOMContentLoaded", fn); } }