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' : ''}}"
href="/accounts/{{originalAccountId}}"
title="{{'@' + originalAccount.acct}}"
focus-key="{{focusKey}}"
>
{{originalAccount.display_name || originalAccount.username}}

View File

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

View File

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