From dd53cb5da935c26dcf5838ee8d2fbc9c88e5e073 Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Fri, 5 Nov 2010 23:00:48 +0000 Subject: [PATCH] Fixes #1745, Observe private browsing mode Don't report translator failure if in private browsing mode Thanks to ajlyon for the patch --- chrome/content/zotero/xpcom/translation/translate.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/chrome/content/zotero/xpcom/translation/translate.js b/chrome/content/zotero/xpcom/translation/translate.js index 2eb5e34ea..d1b5c69c9 100644 --- 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()) +