From bf9ef5fc01c2c0d82fbdc74d0082ef72e3274a34 Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Sun, 6 Feb 2022 17:15:26 -0500 Subject: [PATCH] Disable PDF annotation transfer in group libraries --- chrome/content/zotero/standalone/standalone.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/chrome/content/zotero/standalone/standalone.js b/chrome/content/zotero/standalone/standalone.js index f5640b0ea4..eaab188ab2 100644 --- a/chrome/content/zotero/standalone/standalone.js +++ b/chrome/content/zotero/standalone/standalone.js @@ -154,12 +154,16 @@ const ZoteroStandalone = new function() { catch (e) {} this.updateMenuItemEnabled('manage-attachments-menu', active); + // PDF annotation transfer ("Import Annotation"/"Store Annotations in File") let reader = Zotero.Reader.getByTabID(Zotero_Tabs.selectedID); if (reader) { let item = Zotero.Items.get(reader.itemID); + let library = Zotero.Libraries.get(item.libraryID); if (item - && Zotero.Libraries.get(item.libraryID).editable - && !(item.deleted || item.parentItem && item.parentItem.deleted)) { + // Don't allow annotation transfer in group libraries + && library.libraryType == 'user' + && library.editable + && !(item.deleted || item.parentItem && item.parentItem.deleted)) { let annotations = item.getAnnotations(); let canTransferFromPDF = annotations.find(x => x.annotationIsExternal); let canTransferToPDF = annotations.find(x => !x.annotationIsExternal);