mirror of
				https://github.com/TriliumNext/Notes.git
				synced 2025-10-29 11:44:21 +08:00 
			
		
		
		
	double click on an external link opens it
This commit is contained in:
		
							parent
							
								
									d953d96fa6
								
							
						
					
					
						commit
						cabb78b3e4
					
				| @ -149,6 +149,18 @@ async function loadReferenceLinkTitle(noteId, $el) { | ||||
| $(document).on('click', "a", goToLink); | ||||
| $(document).on('auxclick', "a", goToLink); // to handle middle button
 | ||||
| $(document).on('contextmenu', 'a', linkContextMenu); | ||||
| $(document).on('dblclick', "a", e => { | ||||
|     e.preventDefault(); | ||||
|     e.stopPropagation(); | ||||
| 
 | ||||
|     const $link = $(e.target).closest("a"); | ||||
| 
 | ||||
|     const address = $link.attr('href'); | ||||
| 
 | ||||
|     if (address && address.startsWith('http')) { | ||||
|         window.open(address, '_blank'); | ||||
|     } | ||||
| }); | ||||
| 
 | ||||
| export default { | ||||
|     getNotePathFromUrl, | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 zadam
						zadam