徐枫
|
f39ff8c215
|
feat: implement M3 multi-browser support (Firefox, Edge, Safari)
Add browser abstraction layer (compat.ts) that normalizes Chrome/Firefox/
Edge/Safari extension APIs behind a unified promise-based interface.
Replace all direct chrome.* calls with compat layer across service worker,
sync engine, badge, storage, popup, and options modules.
- Browser-specific manifests in manifests/ (Firefox MV3 with gecko settings,
Edge/Safari variants)
- Multi-target build system: `npm run build` produces all four browser
builds in build/<browser>/
- Per-browser build scripts: build:chrome, build:firefox, build:edge, build:safari
- Auto-detects browser at runtime for platform-specific device registration
- All 38 existing tests pass, typecheck clean
Co-Authored-By: Paperclip <noreply@paperclip.ing>
|
2026-03-17 16:58:44 +08:00 |
|
徐枫
|
dc3be4d73f
|
feat: implement M2 Chrome browser extension
Build the CookieBridge Chrome extension (Manifest V3) with:
- Background service worker: cookie monitoring via chrome.cookies.onChanged,
WebSocket connection to relay server with auto-reconnect, HTTP polling
fallback, device registration and pairing flow
- Browser-compatible crypto: libsodium-wrappers-sumo for XChaCha20-Poly1305
encryption, Ed25519 signing, X25519 key exchange (mirrors server's
sodium-native API)
- Popup UI: device registration, connection status indicator (gray/blue/
green/red), cookie/device/sync stats, one-click current site sync,
whitelist quick-add, device pairing with 6-digit code
- Options page: server URL config, connection mode (auto/WS/polling),
poll interval slider, auto-sync toggle, domain whitelist/blacklist
management, paired device list, key export/import, data clearing
- Sync engine: LWW conflict resolution with Lamport clocks (same as
server), bidirectional cookie sync with all paired peers, echo
suppression to prevent sync loops
- Badge management: icon color reflects state (gray=not logged in,
blue=connected, green=syncing with count, red=error)
- Build system: esbuild bundling for Chrome 120+, TypeScript with
strict mode, clean type checking
Co-Authored-By: Paperclip <noreply@paperclip.ing>
|
2026-03-17 16:30:18 +08:00 |
|