From ab873b3b0594ca7424d22cbc7094e15ff33252e2 Mon Sep 17 00:00:00 2001 From: "(quasar) nebula" Date: Fri, 5 Apr 2024 17:19:19 -0300 Subject: content: transformContent: show tooltip for images with links --- src/content/dependencies/transformContent.js | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/content/dependencies/transformContent.js b/src/content/dependencies/transformContent.js index 654bb258..42790e7c 100644 --- a/src/content/dependencies/transformContent.js +++ b/src/content/dependencies/transformContent.js @@ -266,13 +266,22 @@ export default { {class: 'pixelate'}); if (link) { - // TODO: Would be nice to use an external link component here, - // just for the title text (ex. "YouTube (opens in new tab)") content = html.tag('a', {href: link}, {target: '_blank'}, + {title: + language.$('misc.external.opensInNewTab', { + link: + language.formatExternalLink(link, { + style: 'platform', + }), + + annotation: + language.$('misc.external.opensInNewTab.annotation'), + }).toString()}, + content); } -- cgit 1.3.0-6-gf8a5