var pmaWidgetInstance60334254d9685ed272790e4d = { debug: false, baseUrl: "https://public.pricemania.sk", exitLink: "https://www.pricemania.sk/exitv2/?data=dc4ab0c3ebbc673d6af340fbbb9ed3d9:18d663f3e7a5a0bdb0ac8ff64ddef2f6d4c68466ae2ca0257a80bb76911eec064a11c8eef6b60f46098c69c8d1f2d2d803ca45190d8d87247b8252ee0ea72628af7f35d4bd249d4a1b13fd5b5de513fb0044f7af9ea921d38c2c699b5ea56fa36508d7f4452f516d6ba958c10332f9fe50286600a1698a31c899a3d82bba0f44c510d80a5ab1fc3a794b42c3363b92c778d18e22386fb0be39cd2290c25ad2710001239d9a3f9f7344098f48e2c8942efd612fd5c3c673cf0f12ee63a932f1c21784bc30025976ec4a8df13035a5fa41", shop_name: "alza.sk", shop_logo: "https://y1.sk/t/s/130x50/215.jpg", product_price: "69,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(){ pmaWidgetInstance60334254d9685ed272790e4d.initWidget("60334254d9685ed272790e4d"); }) function docReady(fn) { if (document.readyState === "complete" || document.readyState === "interactive") { setTimeout(fn, 1); } else { document.addEventListener("DOMContentLoaded", fn); } }