markdown: Rewrite tooltips for <time> elements.

This now uses TippyJS, which enables a more friendly format.
This commit is contained in:
Dinesh
2021-07-01 23:15:02 +05:30
committed by Tim Abbott
parent 6ce2662df5
commit a7ec1dce0f
5 changed files with 33 additions and 6 deletions

View File

@@ -169,7 +169,7 @@ export const update_elements = (content) => {
text: rendered_time.text,
});
$(this).html(rendered_timestamp);
$(this).attr("title", rendered_time.title);
$(this).attr("data-tippy-content", rendered_time.tooltip_content);
} else {
// This shouldn't happen. If it does, we're very interested in debugging it.
blueslip.error(`Could not parse datetime supplied by backend: ${time_str}`);