Skip to content

Commit

Permalink
v8.7
Browse files Browse the repository at this point in the history
  • Loading branch information
erosman authored Dec 16, 2023
1 parent 23dec54 commit 2d8cfad
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 9 deletions.
13 changes: 8 additions & 5 deletions src/content/about.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,20 @@
<h1 id="changelog">Changelog</h1>
<dl>
<dt>8.7</dt>
<dd>Added Help translate form</dd>
<dd>Added matching pattern to the Log display (#91)</dd>
<dd>Added option to proxies on the toolbar badge when in Proxy by Patterns mode (Firefox only) (#57)</dd>
<dd>Added Auto Backup feature</dd>
<dd>Added FoxyProxy Basic detection (disabled for now)</dd>
<dd>Added Help translation form</dd>
<dd>Added option to show proxies on the toolbar badge when in Proxy by Patterns mode (Firefox only) (#57)</dd>
<dd>Added pattern matching to the Log display (#91)</dd>
<dd>Added proxy title to the toolbar icon mouse-over title display (#74)</dd>
<dd>Changed the global Proxy DNS to per-proxy setting (#75)</dd>
<dd>Fixed Firefox for Android compatibility (#60)</dd>
<dd>Increased the maximum height of pattern rows before scrolling</dd>
<dd>Increased the maximum height of the pattern section before scrolling</dd>
<dd>Removed Help document display on install/upgrade (#86)</dd>
<dd>Updated default Firefox proxy setting (#59)</dd>
<dd>Updated default Firefox proxy resetting (#59)</dd>
<dd>Updated PAC check to allow "file:" (#49)</dd>
<dd>Updated pattern "Add" button text due to localisation issues (#88)</dd>
<dd>Updated schema.json</dd>
<dd>Updated wildcard to regular expression conversion (#72)</dd>

<dt>8.6</dt>
Expand Down
1 change: 1 addition & 0 deletions src/content/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ typeof globalThis.browser === 'undefined' && (globalThis.browser = globalThis.ch
export const pref = {
mode: 'disable',
sync: false,
autoBackup: false,
showPatternProxy: false,
passthrough: '',
container: {},
Expand Down
3 changes: 2 additions & 1 deletion src/content/help.html
Original file line number Diff line number Diff line change
Expand Up @@ -1048,11 +1048,12 @@ <h1 id="enterprise-policy" class="experimental">Enterprise Policy <span>(v8.2)</
</li>
</ul>

<h4>Default Options <span>(v8.2)</span></h4>
<h4>Default Options <span>(v8.7)</span></h4>
<pre>
{
"mode": "disable", // mandatory: current option, necessary to enable
"sync": false, // optional: not necessary as it will be disabled on managed storage
"autoBackup": false, // optional: not necessary as save is disabled on managed storage
"showPatternProxy": false, // optional: Show proxies on the toolbar badge when in Proxy by Patterns mode (Firefox only)
"passthrough": "", // optional: Global Exclude
"container": {}, // optional: Incognito/Container settings
Expand Down
4 changes: 2 additions & 2 deletions src/content/import-export.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,10 @@ export class ImportExport {
}

// export preferences
static export(pref) {
static export(pref, saveAs = true) {
const data = JSON.stringify(pref, null, 2);
const filename = `${browser.i18n.getMessage('extensionName')}_${new Date().toISOString().substring(0, 10)}.json`;
this.saveFile({data, filename, type: 'application/json'});
this.saveFile({data, filename, type: 'application/json', saveAs});
}

static saveFile({data, filename, saveAs = true, type = 'text/plain'}) {
Expand Down
3 changes: 3 additions & 0 deletions src/content/options.html
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,9 @@
<label class="pointer" data-i18n="enableSync"><input type="checkbox" id="sync"></label>
<p class="description" data-i18n="enableSyncDescription"></p>

<label data-i18n="autoBackup"><input type="checkbox" id="autoBackup"></label>
<p class="description" data-i18n="autoBackupDescription"></p>

<label data-i18n="limitWebRTC"><input type="checkbox" id="limitWebRTC"></label>
<p class="description" data-i18n="limitWebRTCDescription"></p>

Expand Down
5 changes: 4 additions & 1 deletion src/content/options.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ class Options {
document.querySelector('.options button[data-i18n="restoreDefaults"]').addEventListener('click', () => this.restoreDefaults());

// this.init(['sync', 'proxyDNS', 'passthrough']);
this.init(['sync', 'showPatternProxy', 'passthrough']);
this.init(['sync', 'showPatternProxy', 'autoBackup', 'passthrough']);
}

static init(keys = Object.keys(pref)) {
Expand Down Expand Up @@ -192,6 +192,9 @@ class Options {

// --- update Proxy
browser.runtime.sendMessage({id: 'setProxy', pref});

// --- Auto Backup
pref.autoBackup && ImportExport.export(pref, false);
}

static async getProxyDetails(elem) {
Expand Down

0 comments on commit 2d8cfad

Please sign in to comment.