Add setting to disable hover cards (#30931)

Co-authored-by: Eugen Rochko <eugen@zeonfederated.com>
This commit is contained in:
Claire 2024-07-11 21:42:58 +02:00 committed by GitHub
parent 8c8bee5a36
commit ad52b04a1c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 16 additions and 6 deletions

View file

@ -116,7 +116,7 @@ class StatusContent extends PureComponent {
if (mention) {
link.addEventListener('click', this.onMentionClick.bind(this, mention), false);
link.removeAttribute('title');
link.setAttribute('title', `@${mention.get('acct')}`);
link.setAttribute('href', `/@${mention.get('acct')}`);
link.setAttribute('data-hover-card-account', mention.get('id'));
} else if (link.textContent[0] === '#' || (link.previousSibling && link.previousSibling.textContent && link.previousSibling.textContent[link.previousSibling.textContent.length - 1] === '#')) {