Privetize downloads
This commit is contained in:
parent
bf725ece72
commit
8c4ceb3e4b
@ -48,6 +48,9 @@ const CHROME_CONTEXTS = Object.freeze(new Set([
|
||||
|
||||
async function runContentJob(tab: Tab, file: string, msg: any) {
|
||||
try {
|
||||
if (tab && tab.incognito && msg) {
|
||||
msg.private = tab.incognito;
|
||||
}
|
||||
const res = await tabs.executeScript(tab.id, {
|
||||
file,
|
||||
allFrames: true,
|
||||
|
@ -77,6 +77,8 @@ function urlToUsable(e: any, u: string) {
|
||||
}
|
||||
|
||||
class Gatherer {
|
||||
private: boolean;
|
||||
|
||||
textLinks: boolean;
|
||||
|
||||
selectionOnly: boolean;
|
||||
@ -88,6 +90,7 @@ class Gatherer {
|
||||
transferable: string[];
|
||||
|
||||
constructor(options: any) {
|
||||
this.private = !!options.private;
|
||||
this.textLinks = options.textLinks;
|
||||
this.selectionOnly = options.selectionOnly;
|
||||
this.selection = options.selectionOnly ? getSelection() : null;
|
||||
@ -255,6 +258,7 @@ class Gatherer {
|
||||
return {
|
||||
url: url.href,
|
||||
title,
|
||||
private: this.private
|
||||
};
|
||||
}
|
||||
catch (ex) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user