Package information
@hls-downloader/popupsrc/popup/src/src/popup/src/index.tsxApplication structure
App component
Root application component that sets up the theme and router. Location:src/popup/src/App.tsx:5
The popup has fixed dimensions of 500x600 pixels and uses the design system’s theme hook.
Modules
The popup is organized into feature modules located insrc/popup/src/modules/.
Sniffer module
Location:src/popup/src/modules/Sniffer/
Displays detected HLS playlists from the current browsing session.
SnifferView props
Location:src/popup/src/modules/Sniffer/SnifferView.tsx:39
Array of detected playlists
ID of the currently selected playlist
Full playlist object for the selected playlist
Loading/ready status of the current playlist
Filter string for playlist search
Callback to clear all detected playlists
Callback to copy playlist URLs to clipboard
Update the filter string
Select a playlist by ID
Manual playlist URL input
Update the direct URI input
Add a playlist from the direct URI input
Array of expanded playlist IDs
Toggle playlist expansion state
Key features
Direct URL input
Users can manually paste m3u8 URLs to add playlists
Playlist filtering
Search/filter detected playlists by title or URL
Animated transitions
GSAP-powered animations for smooth list/detail transitions
Expandable rows
Accordion-style playlist rows with details
Example: Playlist row structure
Playlist module
Location:src/popup/src/modules/Playlist/
Displays quality/track selection for a specific playlist.
PlaylistView props
Location:src/popup/src/modules/Playlist/PlaylistView.tsx:31
Current status:
fetching, ready, or errorAvailable video quality levels
Available audio tracks
Available subtitle tracks
ID of selected video quality
ID of selected audio track
ID of selected subtitle track
Callback when video quality is selected
Callback when audio track is selected
Callback when subtitle track is selected
Callback to start download
Whether download button should be enabled
Encryption status for each track
Whether encryption inspection is in progress
Whether unsupported encryption is blocking download
Track detail formatting
Location:src/popup/src/modules/Playlist/PlaylistView.tsx:94
The component formats track details for display:
Video details
Audio details
Downloads module
Location:src/popup/src/modules/Downloads/
Displays active and completed download jobs.
DownloadsView props
Location:src/popup/src/modules/Downloads/DownloadsView.tsx:18
Array of download jobs
Whether any jobs exist
Whether to show the filter input
ID of the currently selected job
Filter string for job search
Select a job by ID
Update the filter string
Settings module
Location:src/popup/src/modules/Settings/
Provides user configuration options.
About module
Location:src/popup/src/modules/About/
Displays version information and links.
Router module
Location:src/popup/src/modules/Navbar/
Handles navigation between modules using React Router.
State management
The popup uses Redux for state management viawebext-redux, which synchronizes state with the background script.
Animations
Library: GSAP 3.13.0 The popup uses GSAP for smooth animations, particularly in the Sniffer module for transitioning between list and detail views. Location:src/popup/src/modules/Sniffer/SnifferView.tsx:78
Dependencies
- React 18.3.1 - UI library
- React Router 6.10.0 - Navigation
- Redux Toolkit - State management
- webext-redux 2.1.9 - Redux bridge for extensions
- GSAP 3.13.0 - Animation library
- HLS.js 1.6.15 - HLS playlist parsing
- Lucide React 0.137.0 - Icons
- @hls-downloader/design-system - UI components
- @hls-downloader/core - Business logic
Development
- Build
- Watch mode
- Storybook
- Test
Reuse components from
@hls-downloader/design-system for consistent styling. Use two-space indentation.