Add dropdown menu to hashtag links in web UI (#34393)

This commit is contained in:
Eugen Rochko 2025-04-11 12:50:46 +02:00 committed by GitHub
parent a296facdea
commit a9cfaa6eed
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 213 additions and 22 deletions

View file

@ -115,6 +115,7 @@ class StatusContent extends PureComponent {
} else if (link.textContent[0] === '#' || (link.previousSibling && link.previousSibling.textContent && link.previousSibling.textContent[link.previousSibling.textContent.length - 1] === '#')) {
link.addEventListener('click', this.onHashtagClick.bind(this, link.text), false);
link.setAttribute('href', `/tags/${link.text.replace(/^#/, '')}`);
link.setAttribute('data-menu-hashtag', this.props.status.getIn(['account', 'id']));
} else {
link.setAttribute('title', link.href);
link.classList.add('unhandled-link');