Add Zotero.Item::isPDFAttachment()

Returns true for stored or linked PDFs
This commit is contained in:
Dan Stillman 2020-12-27 20:02:15 -05:00
parent b1e324ddfb
commit 688298af7f

View file

@ -2248,6 +2248,14 @@ Zotero.Item.prototype.isEmbeddedImageAttachment = function() {
}
/**
* @return {Boolean} - Returns true if item is a stored or linked PDF attachment
*/
Zotero.Item.prototype.isPDFAttachment = function () {
return this.isAttachment() && this.attachmentContentType == 'application/pdf';
};
/**
* Returns number of child attachments of item
*