mirror of
https://github.com/zotero/zotero.git
synced 2026-10-06 02:50:03 +00:00
Use is*Attachment() in attachmentReaderType getter
This commit is contained in:
parent
fb9aab3bb0
commit
281da55217
1 changed files with 9 additions and 9 deletions
|
|
@ -3208,16 +3208,16 @@ Zotero.defineProperty(Zotero.Item.prototype, 'attachmentReaderType', {
|
|||
if (!this.isFileAttachment()) {
|
||||
return undefined;
|
||||
}
|
||||
switch (this.attachmentContentType) {
|
||||
case 'application/pdf':
|
||||
return 'pdf';
|
||||
case 'application/epub+zip':
|
||||
return 'epub';
|
||||
case 'text/html':
|
||||
return 'snapshot';
|
||||
default:
|
||||
return undefined;
|
||||
if (this.isPDFAttachment()) {
|
||||
return 'pdf';
|
||||
}
|
||||
else if (this.isEPUBAttachment()) {
|
||||
return 'epub';
|
||||
}
|
||||
else if (this.isSnapshotAttachment()) {
|
||||
return 'snapshot';
|
||||
}
|
||||
return undefined;
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue