Add hover cards in web UI (#30754)
Co-authored-by: Renaud Chaput <renchap@gmail.com>
This commit is contained in:
		
					parent
					
						
							
								863c470a2b
							
						
					
				
			
			
				commit
				
					
						e89317d4c1
					
				
			
		
					 18 changed files with 631 additions and 42 deletions
				
			
		|  | @ -116,8 +116,9 @@ class StatusContent extends PureComponent { | |||
| 
 | ||||
|       if (mention) { | ||||
|         link.addEventListener('click', this.onMentionClick.bind(this, mention), false); | ||||
|         link.setAttribute('title', `@${mention.get('acct')}`); | ||||
|         link.removeAttribute('title'); | ||||
|         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] === '#')) { | ||||
|         link.addEventListener('click', this.onHashtagClick.bind(this, link.text), false); | ||||
|         link.setAttribute('href', `/tags/${link.text.replace(/^#/, '')}`); | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue