diff --git a/worker.ts b/worker.ts index cda3652..5cd590b 100644 --- a/worker.ts +++ b/worker.ts @@ -4,6 +4,7 @@ async function applyProxy() { const { active, host, port, bypass } = await chrome.storage.local.get(["active", "host", "port", "bypass"]) as Storage; if (!active) { chrome.proxy.settings.clear({ scope: "regular" }, function () { }); + await chrome.action.setBadgeText({ text: "" }); return; } const config = { @@ -18,6 +19,7 @@ async function applyProxy() { } }; chrome.proxy.settings.set({ value: config, scope: "regular" }, function () { }); + await chrome.action.setBadgeText({ text: "✓" }); } chrome.storage.onChanged.addListener(() => { void applyProxy(); }); void applyProxy();