From 6fb7349660cb65c9739638565ad2e94ef801847a Mon Sep 17 00:00:00 2001 From: Andrea Scarpino Date: Tue, 14 May 2024 22:36:57 +0200 Subject: [PATCH] Suggestions --- jscomps/EmbedliteDownloadManager.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/jscomps/EmbedliteDownloadManager.js b/jscomps/EmbedliteDownloadManager.js index 828730a..9ec3f7b 100644 --- a/jscomps/EmbedliteDownloadManager.js +++ b/jscomps/EmbedliteDownloadManager.js @@ -15,7 +15,6 @@ const Cu = Components.utils; const Cr = Components.results; const { XPCOMUtils } = ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm"); -const { PrivateBrowsingUtils } = ChromeUtils.import("resource://gre/modules/PrivateBrowsingUtils.jsm"); XPCOMUtils.defineLazyModuleGetter(this, "Downloads", "resource://gre/modules/Downloads.jsm"); @@ -56,6 +55,7 @@ let DownloadView = { JSON.stringify({ msg: "dl-start", id: this.counter, + privateMode: download.isPrivate || false, saveAsPdf: download.saveAsPdf || false, displayName: download.target.path.split('/').slice(-1)[0], sourceUrl: download.source.url, @@ -79,7 +79,6 @@ let DownloadView = { JSON.stringify({ msg: "dl-done", id: download.id, - privateMode: PrivateBrowsingUtils.isContentWindowPrivate(Services.ww.activeWindow) || false, saveAsPdf: download.saveAsPdf || false, targetPath: download.target.path })); @@ -91,7 +90,6 @@ let DownloadView = { JSON.stringify({ msg: "dl-fail", id: download.id, - privateMode: PrivateBrowsingUtils.isContentWindowPrivate(Services.ww.activeWindow) || false, saveAsPdf: download.saveAsPdf || false })); } @@ -101,7 +99,6 @@ let DownloadView = { JSON.stringify({ msg: "dl-cancel", id: download.id, - privateMode: PrivateBrowsingUtils.isContentWindowPrivate(Services.ww.activeWindow) || false, saveAsPdf: download.saveAsPdf || false })); } @@ -156,6 +153,7 @@ let DownloadView = { JSON.stringify({ msg: "dl-start", id: download.id, + privateMode: download.isPrivate || false, saveAsPdf: download.saveAsPdf || false, displayName: download.target.path.split('/').slice(-1)[0], sourceUrl: download.source.url,