Fix feed item translation in standalone
Broken due to non-existing progress window in standalone Zotero_Browser
This commit is contained in:
parent
b2d580f3c9
commit
897b3993b4
2 changed files with 6 additions and 2 deletions
|
@ -98,7 +98,10 @@ var Zotero_Browser = new function() {
|
|||
* Initialize some variables and prepare event listeners for when chrome is done loading
|
||||
*/
|
||||
function init() {
|
||||
// No gBrowser - running in standalone
|
||||
if (!window.hasOwnProperty("gBrowser")) {
|
||||
// We can still have a progress window in this though
|
||||
reload();
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -219,8 +219,9 @@ Zotero.FeedItem.prototype.translate = Zotero.Promise.coroutine(function* (librar
|
|||
let translate = new Zotero.Translate.Web();
|
||||
|
||||
if (libraryID) {
|
||||
// Show progress notifications when scraping to a library
|
||||
var win = Services.wm.getMostRecentWindow("navigator:browser");
|
||||
// Show progress notifications when scraping to a library. Shown under the most recent
|
||||
// window (Zotero Pane). Browser window not available in standalone.
|
||||
var win = Services.wm.getMostRecentWindow(null);
|
||||
translate.clearHandlers("done");
|
||||
translate.clearHandlers("itemDone");
|
||||
translate.setHandler("done", win.Zotero_Browser.progress.Translation.doneHandler);
|
||||
|
|
Loading…
Add table
Reference in a new issue