Refactor ServerInfo and add icon and tab fallbacks

This commit is contained in:
2026-02-03 05:03:55 +01:00
parent 2973e038d6
commit 9292a4a6e2
5 changed files with 107 additions and 83 deletions
+2 -2
View File
@@ -4,7 +4,7 @@ import { StorageService } from '@/utils/storage';
export default defineBackground({
main() {
// Listen for Network Responses (Source of Truth for IPs)
// Listen for Network Responses
browser.webRequest.onResponseStarted.addListener(
async (details) => {
if (details.tabId === -1 || details.type !== 'main_frame' || !details.ip) return;
@@ -27,7 +27,7 @@ export default defineBackground({
}
});
// 3. Cleanup
// Cleanup
browser.tabs.onRemoved.addListener(async (tabId) => {
await StorageService.remove(tabId);
});