mirror of
https://github.com/zadam/trilium.git
synced 2025-11-02 11:26:15 +01:00
double click on an external link opens it
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user