diff --git a/chrome/content/zotero/xpcom/data/item.js b/chrome/content/zotero/xpcom/data/item.js index 71cc3676c3..ddbf978af1 100644 --- a/chrome/content/zotero/xpcom/data/item.js +++ b/chrome/content/zotero/xpcom/data/item.js @@ -2427,6 +2427,14 @@ Zotero.Item.prototype.isPDFAttachment = function () { }; +/** + * @return {Boolean} - Returns true if item is a stored or linked EPUB attachment + */ +Zotero.Item.prototype.isEPUBAttachment = function () { + return this.isFileAttachment() && this.attachmentContentType == 'application/epub+zip'; +}; + + /** * Returns number of child attachments of item * diff --git a/chrome/content/zotero/zoteroPane.js b/chrome/content/zotero/zoteroPane.js index 111710abaa..c734812612 100644 --- a/chrome/content/zotero/zoteroPane.js +++ b/chrome/content/zotero/zoteroPane.js @@ -3990,8 +3990,9 @@ var ZoteroPane = new function() function isAttachmentWithExtractableAnnotations(item) { // For now, consider all PDF attachments eligible, since we want to extract external // annotations in unprocessed files if present - //return item.isPDFAttachment() && item.getAnnotations().some(x => x.annotationType != 'ink'); - return item.isPDFAttachment(); + // item.isPDFAttachment() && item.getAnnotations().some(x => x.annotationType != 'ink'); + return item.isPDFAttachment() + || (item.isEPUBAttachment() || item.isSnapshotAttachment()) && item.getAnnotations().length; }