Skip to content

Commit a955308

Browse files
committed
Resolve the issues switch between system to manual proxy mode with the keyboard shortcut and checkbox when localStorage.proxyType sets to system proxy mode.
1 parent 9e53f57 commit a955308

File tree

4 files changed

+7
-0
lines changed

4 files changed

+7
-0
lines changed

src/images/icons/set_noproxy-.png

-3.96 KB
Binary file not shown.

src/images/icons/set_systemproxy-.png

-3.85 KB
Binary file not shown.

src/scripts/background_events.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,11 @@ browser.commands.onCommand.addListener(function (command) {
6161
);
6262
} else {
6363
manualProxySetting = JSON.parse(isSwitcherLocalStorageExist);
64+
manualProxySetting.proxyType = "manual";
65+
localStorage.setItem(
66+
"SwitcherManualProxyConfig",
67+
JSON.stringify(manualProxySetting),
68+
);
6469
browser.proxy.settings.set({ value: manualProxySetting });
6570
}
6671

src/scripts/panel_events.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ function setManualProxyFormEvents() {
3333
let getLocalStorageObject = JSON.parse(
3434
localStorage.getItem("SwitcherManualProxyConfig"),
3535
);
36+
getLocalStorageObject.proxyType = "manual";
3637
getLocalStorageObject.ssl = getHttpFieldValue;
3738

3839
// directly update http and https same value field firefox settings
@@ -49,6 +50,7 @@ function setManualProxyFormEvents() {
4950
let getLocalStorageObject = JSON.parse(
5051
localStorage.getItem("SwitcherManualProxyConfig"),
5152
);
53+
getLocalStorageObject.proxyType = "manual";
5254
getLocalStorageObject.ssl = "";
5355

5456
// directly update http and https same value field firefox settings

0 commit comments

Comments
 (0)