5 Commits

Author SHA1 Message Date
Octech2722
b51f83555b feat: implement content scripts for page interaction
Content Script Features:
- Declarative injection via manifest
- Selection extraction and HTML processing
- Image discovery and base64 conversion
- Message passing to service worker

Duplicate Note Notification
- Gives a large visual notification if an exisitng note is found in Trilium
- Can be toggled on/off via settings
- On by default

Runs in page context with proper CSP compliance.
2025-10-18 12:13:41 -05:00
Octech2722
4c53f8b262 feat: implement service worker with capture handlers
Service Worker Architecture:
- Event-driven, stateless (MV3 compatible)
- Message passing with structured error handling
- Chrome storage for state persistence

Capture Features:
- Save Selection (with image processing and base64 embedding)
- Save Page (Readability → DOMPurify → Cheerio pipeline)
- Save Link (basic URL + title)
- Save Screenshot (full page capture, cropping pending)
- Save Image (download and embed as base64)

Additional Features:
- Duplicate note detection with user choice dialog
- Context menu initialization on install
- Keyboard shortcut handlers
- Trilium API communication (create notes, search)
- Connection testing and validation

Uses centralized logging throughout.
No global state - all persistence via chrome.storage.
2025-10-18 12:09:47 -05:00
Octech2722
c28add177e feat: implement comprehensive theme system
Features:
- ThemeManager with three modes (light/dark/system)
- CSS custom properties for semantic colors
- Persistent storage via chrome.storage.sync
- Real-time OS theme detection and updates
- Event subscription system for theme changes

Provides professional theming across all UI components.
System mode automatically follows OS preference.
2025-10-18 12:09:19 -05:00
Octech2722
6811b91a17 feat: implement centralized logging system
Components:
- CentralizedLogger static class for log aggregation
- Logger class with source context (background/content/popup/options)
- Persistent storage in chrome.storage.local (up to 1000 entries)
- Log viewer UI with filtering, search, and export
- Survives service worker restarts

Critical for MV3 debugging where service workers terminate frequently.
Provides unified debugging across all extension contexts.
2025-10-18 12:08:41 -05:00
Octech2722
acbd5c8bcf feat: initialize MV3 project structure
- Manifest V3 configuration with proper permissions
- TypeScript + esbuild build system
- npm dependencies (Readability, DOMPurify, Cheerio)
- Build configuration (IIFE bundling, watch mode)
- Shared TypeScript type definitions

Foundation for Trilium Web Clipper Manifest V3 migration.
2025-10-18 12:07:37 -05:00