From be035893da9184dfd4137c62d08161c860037600 Mon Sep 17 00:00:00 2001 From: windingwind <33902321+windingwind@users.noreply.github.com> Date: Fri, 23 Aug 2024 17:19:01 +0800 Subject: [PATCH] fix: always open note from annotation in builtin window fix: #1093 --- src/modules/reader.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/modules/reader.ts b/src/modules/reader.ts index 0615f85..c348f4e 100644 --- a/src/modules/reader.ts +++ b/src/modules/reader.ts @@ -23,7 +23,7 @@ export function registerReaderAnnotationButton() { createNoteFromAnnotation( reader._item.libraryID, annotationData.id, - (e as MouseEvent).shiftKey ? "window" : "tab", + (e as MouseEvent).shiftKey ? "window" : "builtin", ); e.preventDefault(); }, @@ -54,7 +54,7 @@ export function registerReaderAnnotationButton() { async function createNoteFromAnnotation( libraryID: number, itemKey: string, - openMode: "window" | "tab" | undefined, + openMode: "window" | "builtin" | undefined, ) { const annotationItem = Zotero.Items.getByLibraryAndKey( libraryID, @@ -102,7 +102,7 @@ async function createNoteFromAnnotation( linkTarget.toKey, ); if (targetItem) - addon.hooks.onOpenNote(targetItem.id, openMode || "tab", {}); + addon.hooks.onOpenNote(targetItem.id, openMode || "builtin", {}); return; }