add titles for mention links

This commit is contained in:
Nolan Lawson 2018-03-19 18:05:51 -07:00
parent 00fd911579
commit f6d1e5079a
3 changed files with 3 additions and 0 deletions

View File

@ -1,5 +1,6 @@
<a class="status-author-name {{isStatusInNotification ? 'status-in-notification' : '' }} {{isStatusInOwnThread ? 'status-in-own-thread' : ''}}" <a class="status-author-name {{isStatusInNotification ? 'status-in-notification' : '' }} {{isStatusInOwnThread ? 'status-in-own-thread' : ''}}"
href="/accounts/{{originalAccountId}}" href="/accounts/{{originalAccountId}}"
title="{{'@' + originalAccount.acct}}"
focus-key="{{focusKey}}" focus-key="{{focusKey}}"
> >
{{originalAccount.display_name || originalAccount.username}} {{originalAccount.display_name || originalAccount.username}}

View File

@ -118,6 +118,7 @@
for (let anchorTag of anchorTags) { for (let anchorTag of anchorTags) {
if (anchorTag.getAttribute('href') === mention.url) { if (anchorTag.getAttribute('href') === mention.url) {
anchorTag.setAttribute('href', `/accounts/${mention.id}`) anchorTag.setAttribute('href', `/accounts/${mention.id}`)
anchorTag.setAttribute('title', `@${mention.acct}`)
anchorTag.setAttribute('focus-key', `status-content-link-${uuid}-${++count}`) anchorTag.setAttribute('focus-key', `status-content-link-${uuid}-${++count}`)
anchorTag.removeAttribute('target') anchorTag.removeAttribute('target')
anchorTag.removeAttribute('rel') anchorTag.removeAttribute('rel')

View File

@ -7,6 +7,7 @@
Pinned toot Pinned toot
{{else}} {{else}}
<a href="/accounts/{{accountId}}" <a href="/accounts/{{accountId}}"
title="{{'@' + account.acct}}"
focus-key="{{focusKey}}" > focus-key="{{focusKey}}" >
{{account.display_name || account.username}} {{account.display_name || account.username}}
</a> </a>