Don't limit PDF retrieval to dev builds
This commit is contained in:
parent
862ac5ab40
commit
4eb4490723
3 changed files with 5 additions and 13 deletions
|
@ -72,9 +72,7 @@ var Zotero_Lookup = new function () {
|
||||||
// If we don't yet have a file, check for available PDFs
|
// If we don't yet have a file, check for available PDFs
|
||||||
if (Zotero.Prefs.get('downloadAssociatedFiles')
|
if (Zotero.Prefs.get('downloadAssociatedFiles')
|
||||||
&& newItems[0]
|
&& newItems[0]
|
||||||
&& !newItems[0].numPDFAttachments()
|
&& !newItems[0].numPDFAttachments()) {
|
||||||
// TEMP: Limit to dev builds
|
|
||||||
&& Zotero.isDevBuild) {
|
|
||||||
try {
|
try {
|
||||||
yield Zotero.Attachments.addAvailablePDF(newItems[0]);
|
yield Zotero.Attachments.addAvailablePDF(newItems[0]);
|
||||||
}
|
}
|
||||||
|
|
|
@ -198,9 +198,7 @@ Zotero.Translate.ItemSaver.prototype = {
|
||||||
// TODO: Separate pref?
|
// TODO: Separate pref?
|
||||||
var openAccessPDFURLs = new Map();
|
var openAccessPDFURLs = new Map();
|
||||||
if (this.attachmentMode == Zotero.Translate.ItemSaver.ATTACHMENT_MODE_DOWNLOAD
|
if (this.attachmentMode == Zotero.Translate.ItemSaver.ATTACHMENT_MODE_DOWNLOAD
|
||||||
&& Zotero.Prefs.get('downloadAssociatedFiles')
|
&& Zotero.Prefs.get('downloadAssociatedFiles')) {
|
||||||
// TEMP: Limit to dev builds
|
|
||||||
&& Zotero.isDevBuild) {
|
|
||||||
for (let item of items) {
|
for (let item of items) {
|
||||||
let jsonItem = jsonByItem.get(item);
|
let jsonItem = jsonByItem.get(item);
|
||||||
|
|
||||||
|
@ -255,9 +253,7 @@ Zotero.Translate.ItemSaver.prototype = {
|
||||||
// If a translated PDF attachment wasn't saved successfully, either because there wasn't
|
// If a translated PDF attachment wasn't saved successfully, either because there wasn't
|
||||||
// one or there was but it failed, look for another PDF (if enabled)
|
// one or there was but it failed, look for another PDF (if enabled)
|
||||||
if (this.attachmentMode == Zotero.Translate.ItemSaver.ATTACHMENT_MODE_DOWNLOAD
|
if (this.attachmentMode == Zotero.Translate.ItemSaver.ATTACHMENT_MODE_DOWNLOAD
|
||||||
&& Zotero.Prefs.get('downloadAssociatedFiles')
|
&& Zotero.Prefs.get('downloadAssociatedFiles')) {
|
||||||
// TEMP: Limit to dev builds
|
|
||||||
&& Zotero.isDevBuild) {
|
|
||||||
for (let item of items) {
|
for (let item of items) {
|
||||||
// Already have a PDF from translation
|
// Already have a PDF from translation
|
||||||
if (itemIDsWithPDFAttachments.has(item.id)) {
|
if (itemIDsWithPDFAttachments.has(item.id)) {
|
||||||
|
|
|
@ -2843,8 +2843,7 @@ var ZoteroPane = new function()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// TEMP: Limit to dev builds
|
if (canFindPDF) {
|
||||||
if (canFindPDF && Zotero.isDevBuild) {
|
|
||||||
show.push(m.findPDF, m.sep3);
|
show.push(m.findPDF, m.sep3);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2903,8 +2902,7 @@ var ZoteroPane = new function()
|
||||||
show.push(m.addNote, m.addAttachments, m.sep2);
|
show.push(m.addNote, m.addAttachments, m.sep2);
|
||||||
}
|
}
|
||||||
|
|
||||||
// TEMP: Limit to dev builds
|
if (Zotero.Attachments.canFindPDFForItem(item)) {
|
||||||
if (Zotero.Attachments.canFindPDFForItem(item) && Zotero.isDevBuild) {
|
|
||||||
show.push(m.findPDF, m.sep3);
|
show.push(m.findPDF, m.sep3);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue