Don't show Reindex button for files that aren't PDFs or text files
This commit is contained in:
parent
97661539dc
commit
26dcaad76a
1 changed files with 6 additions and 1 deletions
|
@ -1347,7 +1347,12 @@ Zotero.Fulltext = Zotero.FullText = new function(){
|
|||
* Item must be a non-web-link attachment that isn't already fully indexed
|
||||
*/
|
||||
this.canReindex = Zotero.Promise.coroutine(function* (item) {
|
||||
if (item.isAttachment() && item.attachmentLinkMode != Zotero.Attachments.LINK_MODE_LINKED_URL) {
|
||||
if (item.isAttachment()
|
||||
&& item.attachmentLinkMode != Zotero.Attachments.LINK_MODE_LINKED_URL) {
|
||||
let contentType = item.attachmentContentType;
|
||||
if (!contentType || contentType != 'application/pdf' && !Zotero.MIME.isTextType(contentType)) {
|
||||
return false;
|
||||
}
|
||||
switch (yield this.getIndexedState(item)) {
|
||||
case this.INDEX_STATE_UNAVAILABLE:
|
||||
case this.INDEX_STATE_UNINDEXED:
|
||||
|
|
Loading…
Reference in a new issue