Fix: Google Account Index Sync (authuser mapping)
Resolved the persistent bug where the extension's account index (u/#) was misaligned with Google's actual authuser index in Chrome.
Root Cause
Chrome MV3 service workers cannot send cookies with fetch() — the Cookie header is a forbidden header in the Fetch API spec and is silently dropped, causing ListAccounts API to return 400/403.
Solution
Uses chrome.scripting.executeScript with world: 'MAIN' to run the ListAccounts fetch inside a real Google page context where cookies are naturally available via the browser's cookie jar.
Changes
- Replaced service worker direct fetch with MAIN world script injection
- Added
scripting,cookiespermissions andwww.google.comhost permission - Simplified background.ts (544 → 180 lines)