- Remove RELOAD_TAB message chain, use chrome.tabs.reload() directly
- Rename IndexedDB label to '站点存储' for accuracy
- Introduce StorageSizeInfo type to distinguish bytes vs count
- Rename totalSize to totalBytes for clarity
- Merge runCleanScript into runScript to reduce duplication
- Rename CleaningResult.success to overallSuccess to avoid confusion
- Remove unused domain state and setDomain call
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Remove the custom 373-line GlobalSnackbar component and its Provider/Hook
in favor of the already-installed sonner library.
Changes:
- Delete src/components/GlobalSnackbar.tsx (+ tests)
- Remove SnackbarProvider from popup/App.tsx and sidepanel/App.tsx
- Replace useSnackbar() calls with toast.success()/toast.error() in:
- ImageUploader.tsx
- useQrCode.ts
- ParsePanel.tsx
- LiveClock.tsx
- Update test mocks to use sonner instead of GlobalSnackbar
-554 lines, +43 lines (net -511 lines)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Replace the 30-line chrome.alarms API implementation with a simple
setTimeout for delayed tab reloads.
Rationale: The only usage is a 1-second delay after storage cleaning.
Service workers don't go idle within 1 second, so alarms' persistence
benefit is unnecessary here.
- Removed: alarm naming, create/clear, listener register/unregister
- Added: 4-line setTimeout conditional
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Move the 62-line inline main world injection function from background.ts
to a dedicated utils/rightClickInjection.ts file.
This separates the RightClickRestorer's DOM patching logic from the
service worker's message routing concerns.
- background.ts: -62 lines, now delegates to imported function
- utils/rightClickInjection.ts: new file with mainWorldInjectionScript()
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- Remove messageHandler.ts (6-line pass-through facade)
- Import contextMenuHandler directly from content.ts
- Replace local getI18nText() with shared getMessage() from utils/chromeI18n
Reduces content script files from 3 to 2 and eliminates i18n logic duplication.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- Remove unused imports and variables across 35 files
- Simplify component logic and remove dead code
- Clean up test files by removing unnecessary setup
- Streamline CI workflow configuration
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>