How salcc/scholar-pdf-reader-with-annotations works
Component Details
a) Core Components:
• PDF Viewer (reader.html)
• Annotation System
• Background Service
• Storage Manager
• Language Support System
b) Worker Components:
• PDF Worker (pdf.worker.js)
• Analyzer Worker (analyzer_worker_bin.js)
Data Flow Representation
Key interactions:
Browser Storage <-> Storage Manager <-> Annotation System
PDF Viewer <-> Annotation System <-> UI Components
Background Service <-> Content Scripts <-> Page Context
Specific Implementation Details
• Blue rectangles: Core UI components (PDF viewer, annotation interface)
• Green rectangles: Processing components (workers, analyzers)
• Yellow diamonds: Storage components
• Purple rectangles: Extension service components
Component Relationships
Key relationships:
PDF Viewer
• > Annotation System
• > Highlight Management
• > Storage Interface
• > UI Controls
• > Document Processing
• > PDF Worker
• > Analyzer Worker
Special Features
• Localization System (\_locales directory)
• PDF Character Mapping (bcmaps directory)
• Settings Interface
• Import/Export Functionality
Security boundaries and communication channels
This system design should help developers understand both the high-level architecture and the specific implementation details of the extension.