Add prefs for timeouts for downloading PDF via browser
1 second isn't enough for some users, so try 1.5, and allow for easier debugging via a pref. https://forums.zotero.org/discussion/96431/i-have-access-to-pdf-but-zotero-cannot-automatically-add-it https://forums.zotero.org/discussion/97277/unable-to-download-papers-using-zotero-chrome-extension
This commit is contained in:
parent
cb2594f53f
commit
5eecc3fc54
2 changed files with 5 additions and 2 deletions
|
@ -1137,9 +1137,9 @@ Zotero.Attachments = new function(){
|
|||
*/
|
||||
this.downloadPDFViaBrowser = async function (url, path, options = {}) {
|
||||
Zotero.debug(`downloadPDFViaBrowser: Downloading file via browser from ${url}`);
|
||||
const onLoadTimeout = 1e3;
|
||||
const onLoadTimeout = Zotero.Prefs.get('downloadPDFViaBrowser.onLoadTimeout');
|
||||
// Technically this is not a download, but the full operation timeout
|
||||
const downloadTimeout = 60e3;
|
||||
const downloadTimeout = Zotero.Prefs.get('downloadPDFViaBrowser.downloadTimeout');
|
||||
let channelBrowser, hiddenBrowser;
|
||||
let hiddenBrowserPDFFoundDeferred = Zotero.Promise.defer();
|
||||
|
||||
|
|
|
@ -77,6 +77,9 @@ pref("extensions.zotero.sortCreatorAsString", false);
|
|||
pref("extensions.zotero.tagSelector.showAutomatic", true);
|
||||
pref("extensions.zotero.tagSelector.displayAllTags", false);
|
||||
|
||||
pref("extensions.zotero.downloadPDFViaBrowser.onLoadTimeout", 1500);
|
||||
pref("extensions.zotero.downloadPDFViaBrowser.downloadTimeout", 60000);
|
||||
|
||||
// Keyboard shortcuts
|
||||
pref("extensions.zotero.keys.saveToZotero", "S");
|
||||
pref("extensions.zotero.keys.newItem", "N");
|
||||
|
|
Loading…
Reference in a new issue