url_previews: Post-process embed links for performant CSS.

This commit is contained in:
Karl Stolley
2025-04-28 13:09:37 -05:00
committed by Tim Abbott
parent 80f101016e
commit 142d1958a0
4 changed files with 25 additions and 1 deletions

View File

@@ -84,6 +84,11 @@ export function postprocess_content(html: string): string {
}
}
// Add a class to the anchor tag on
if (elt.parentElement?.classList.contains("message_embed_title")) {
elt.classList.add("message-embed-title-link");
}
if (elt.parentElement?.classList.contains("message_inline_image")) {
// For inline images we want to handle the tooltips explicitly, and disable
// the browser's built in handling of the title attribute.