var pmaWidgetInstance63e4e52c4218328905402abb = { debug: false, baseUrl: "https://public.pricemania.sk", exitLink: "https://www.pricemania.sk/exitv2/?data=55cd3699dda107e98d75c6a5d3486ee4:5e65c220c49295a71dc7126e1d52a7959afc8fdea4bf1e54dd29da53a2381cd566b02e9dd2449be02c4747ef4a0b4992421adf0e0da9768207bd34848480f44d99d00470641c75a5179eb3057c4eaa2ec125f183fb4fecc85dc31ef7e5b2c108878abeba8cdb55906919f284189993ddc0d21b74a214348fb03f99a7bb932ac541ba3404d822d89b19fbcf10853265e289901ac9efba7fc52020001a0f1e2154bc941e980ad2e9b6b10447c0a518550be2843a63a6a34c1c8a3bd7eb31b46bf000c787b7dd955d900267ade15b79cad3", shop_name: "klarstein.sk", shop_logo: "https://y1.sk/t/s/130x50/52719.jpg", product_price: "205,90 €", product_shipping: "2,99 €", 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(){ pmaWidgetInstance63e4e52c4218328905402abb.initWidget("63e4e52c4218328905402abb"); }) function docReady(fn) { if (document.readyState === "complete" || document.readyState === "interactive") { setTimeout(fn, 1); } else { document.addEventListener("DOMContentLoaded", fn); } }