Skip to content

Commit

Permalink
Suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
ilpianista committed May 14, 2024
1 parent 0517636 commit 6fb7349
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions jscomps/EmbedliteDownloadManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down Expand Up @@ -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,
Expand All @@ -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
}));
Expand All @@ -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
}));
}
Expand All @@ -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
}));
}
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit 6fb7349

Please sign in to comment.