Fixes #1745, Observe private browsing mode
Don't report translator failure if in private browsing mode Thanks to ajlyon for the patch
This commit is contained in:
parent
f724949d83
commit
dd53cb5da9
1 changed files with 7 additions and 0 deletions
|
@ -979,6 +979,13 @@ Zotero.Translate.Web.prototype.complete = function(returnValue, error) {
|
||||||
|
|
||||||
// Report translaton failure if we failed
|
// Report translaton failure if we failed
|
||||||
if(this._currentState == "translate" && errorString && this.translator[0].inRepository && Zotero.Prefs.get("reportTranslationFailure")) {
|
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) +
|
var postBody = "id=" + encodeURIComponent(this.translator[0].translatorID) +
|
||||||
"&lastUpdated=" + encodeURIComponent(this.translator[0].lastUpdated) +
|
"&lastUpdated=" + encodeURIComponent(this.translator[0].lastUpdated) +
|
||||||
"&diagnostic=" + encodeURIComponent(Zotero.getSystemInfo()) +
|
"&diagnostic=" + encodeURIComponent(Zotero.getSystemInfo()) +
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue