www

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

commit dd53cb5da935c26dcf5838ee8d2fbc9c88e5e073
parent f724949d83c5a458ae3e4ecbb4a5beaf2ed15dff
Author: Dan Stillman <dstillman@zotero.org>
Date:   Fri,  5 Nov 2010 23:00:48 +0000

Fixes #1745, Observe private browsing mode

Don't report translator failure if in private browsing mode

Thanks to ajlyon for the patch


Diffstat:
Mchrome/content/zotero/xpcom/translation/translate.js | 7+++++++
1 file changed, 7 insertions(+), 0 deletions(-)

diff --git a/chrome/content/zotero/xpcom/translation/translate.js b/chrome/content/zotero/xpcom/translation/translate.js @@ -979,6 +979,13 @@ Zotero.Translate.Web.prototype.complete = function(returnValue, error) { // Report translaton failure if we failed if(this._currentState == "translate" && errorString && this.translator[0].inRepository && Zotero.Prefs.get("reportTranslationFailure")) { + // Don't report failure if in private browsing mode + var pbs = Components.classes["@mozilla.org/privatebrowsing;1"] + .getService(Components.interfaces.nsIPrivateBrowsingService); + if (pbs.privateBrowsingEnabled) { + return; + } + var postBody = "id=" + encodeURIComponent(this.translator[0].translatorID) + "&lastUpdated=" + encodeURIComponent(this.translator[0].lastUpdated) + "&diagnostic=" + encodeURIComponent(Zotero.getSystemInfo()) +