var tooltipTemplate = Handlebars.compile(`
{{name}} {{#if verif}} {{/if}}
{{online}}
{{about}}
`); tippy(".mention", { theme: "light vk", content: "⌛", allowHTML: true, interactive: true, interactiveDebounce: 500, onCreate: async function(that) { that._resolvedMention = null; }, onShow: async function(that) { if(!that._resolvedMention) { let id = Number(that.reference.dataset.mentionRef); that._resolvedMention = await API.Mentions.resolve(id); } let res = that._resolvedMention; that.setContent(tooltipTemplate(res)); } });