var pmaWidgetInstance603f65aad9685ed2723d4d74 = { debug: false, baseUrl: "https://public.pricemania.sk", exitLink: "https://www.pricemania.sk/exitv2/?data=cd8726cd18d0297296780ce9d48a7920:837c7cf2e2d5220061e28e66953b104c3a84a173d164da45f1e239aa77059e043868271736e2a0be59e197bf08a2dcaa62798dd1b9ab088f0f42a0009c10487b27562f7053f758dd56cd079ab6b3a49f18904b841d6c49f21f2662e850009bd781dfeff3b14d021ea13cc1fbbc21b7621ac0899520b56d1530e2dbe53ad77a1a93449696270f324c596770b230ea93c0ed19379c34b4f23f95c082df3db8c11fefe45b4e0be9a103b5eb57acb0f4c051b77a06829df5e9d44c5150aec1652ebd", shop_name: "profizoo.sk", shop_logo: "https://y1.sk/t/s/130x50/54095.jpg", product_price: "34,98 €", product_shipping: "5,14 €", 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(){ pmaWidgetInstance603f65aad9685ed2723d4d74.initWidget("603f65aad9685ed2723d4d74"); }) function docReady(fn) { if (document.readyState === "complete" || document.readyState === "interactive") { setTimeout(fn, 1); } else { document.addEventListener("DOMContentLoaded", fn); } }