Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
erosman authored Dec 4, 2023
1 parent f65ca14 commit 544d1e1
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
1 change: 1 addition & 0 deletions src/content/about.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ <h1 id="changelog">Changelog</h1>
<dd>Added enterprise policy & managed storage feature (#42) (experimental)</dd>
<dd>Added option to set the country to blank</dd>
<dd>Fixed an issue with sync (#45)</dd>
<dd>Updated Incognito process on Chrome</dd>


<dt>8.1</dt>
Expand Down
11 changes: 7 additions & 4 deletions src/content/proxy.js
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,12 @@ export class Proxy {
static async setChrome(pref) {
// https://developer.chrome.com/docs/extensions/reference/types/
// Scope and life cycle: regular | regular_only | incognito_persistent | incognito_session_only
const config = {value: {}, scope: 'regular'};

// --- incognito
const incognito = await this.setChromeIncognito(pref);
const scope = incognito ? 'regular_only' : 'regular';
const config = {value: {}, scope};

switch (true) {
case pref.mode === 'disable':
case pref.mode === 'direct':
Expand Down Expand Up @@ -164,9 +169,6 @@ export class Proxy {
}

browser.proxy.settings.set(config);

// --- incognito
this.setChromeIncognito(pref);
}

static findProxy(pref, mode = pref.mode) {
Expand Down Expand Up @@ -204,6 +206,7 @@ export class Proxy {
}

browser.proxy.settings.set(config);
return !!pxy; // true/false
}

static getPacString(pref) {
Expand Down

0 comments on commit 544d1e1

Please sign in to comment.