www

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | Submodules | README | LICENSE

commit 897b3993b435cf56e9b21e4d385ca96e1e856d43
parent b2d580f3c93519ceb72eeaf39e64546bdbcb7f6f
Author: Adomas VenĨkauskas <adomas.ven@gmail.com>
Date:   Fri, 14 Oct 2016 11:10:36 +0300

Fix feed item translation in standalone

Broken due to non-existing progress window in standalone Zotero_Browser

Diffstat:
Mchrome/content/zotero/browser.js | 3+++
Mchrome/content/zotero/xpcom/data/feedItem.js | 5+++--
2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/chrome/content/zotero/browser.js b/chrome/content/zotero/browser.js @@ -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; } diff --git a/chrome/content/zotero/xpcom/data/feedItem.js b/chrome/content/zotero/xpcom/data/feedItem.js @@ -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);