How ohmcodes/ext.udemydownloader works
Project type and purpose
• This is a browser extension (Chrome/Chromium) whose sole purpose is to download Udemy course videos.
• There is no standalone backend—instead, it consists of UI assets (HTML/CSS), extension scripts (background, popup, window), and third-party JS/CSS plugins for rendering data.
File structure
Top level:
• manifest.json – extension metadata, permissions, entry points
• background.js – the persistent background script for long-lived tasks and messaging
• createWindow.js – helper to open a custom browser window for downloads
• Plugins/… – a directory of DataTables, Bootstrap, Buttons, Responsive, Scroller, RowGroup, RowReorder, etc., used to build a rich table UI inside the popup or window
• UdemyDownloader.crx – packaged extension (output)
• virustotal.com hashes.txt – external reference file for security hashes
README
• Confirms it’s a simple “load unpacked” extension.
• No deep architectural notes beyond “Download Udemy Courses Video using browser Extension.”
Main components & interactions
a. Components
1. Browser Environment
2. Extension Manifest
3. Background Script (background.js)
4. Popup UI (popup.html + custom.css + Plugins CSS/JS)
5. Window Creator (createWindow.js)
6. Third-party Plugins Directory (DataTables + Bootstrap + related plugins)
7. External System: Udemy Website (content scripts may inject or request data)
b. Relationships & data flow
2. Popup UI initializes DataTables (using Plugins/*) to show course sections/lectures
3. Popup UI sends messages (chrome.runtime.sendMessage) to Background Script
4. Background Script injects or communicates with content script (implicitly via createWindow.js or directly) to scrape Udemy page for video URLs
5. Background Script receives scraped URLs → passes back to Popup or opens a new window via createWindow.js
6. createWindow.js renders a standalone window with a DataTable of video links, allowing the user to click and download
7. Browser download manager handles video file retrieval
c. Architectural patterns & design principles
• Chrome Extension MVC:
• Model: background.js holds scraped URLs & state
• View: popup.html and the separate window created by createWindow.js
• Controller: message passing between popup and background scripts
• Modular plugin-based UI: Plugins folder serves as a UI component library (Bootstrap + DataTables + extensions)
d. Key technologies & libraries
• Chrome Extensions API (manifest v2/v3 fields)
• JavaScript messaging (chrome.runtime.sendMessage, chrome.tabs.executeScript)
• DataTables (+ Buttons, Responsive, RowGroup, RowReorder, Scroller plugins)
• Bootstrap 4 CSS for styling
• Standard web technologies: HTML5, CSS3, ES5/ES6 JavaScript
Detailed breakdown
• “Popup UI” ↔ “Background Script (background.js)” via chrome.runtime messaging
• “Background Script” → “Udemy Content Script” → “Udemy Website” (scrape video info)
• “Background Script” → “Window Creator (createWindow.js)”
• Accurately reflects the Chrome extension’s architecture
• Distinguishes persistent vs transient components
• Shows data flow from user action to video download
• Highlights the role of third-party UI libraries in the overall design