First off, thank you for taking the time to contribute! 🎉 Contributions of all kinds are welcome — bug reports, feature requests, documentation, new site parsers, translations and code.
This document explains how to get set up and the conventions we follow.
- Code of Conduct
- Ways to Contribute
- Project Layout
- Development Setup
- Available Scripts
- Coding Standards
- Adding a New Site Parser
- Adding or Updating a Translation
- Commit Messages
- Pull Request Process
By participating in this project you agree to uphold a respectful, harassment- free environment for everyone. Please be kind and constructive.
- Report bugs using the bug report template.
- Request features using the feature request template.
- Improve documentation — even fixing a typo helps.
- Add support for a new site — see below.
- Translate the UI — see below.
The extension and all of its tooling live in the video-url-parser/ directory.
The repository root exposes the same npm scripts and delegates into that
directory, so you can work from either location.
.
├── package.json # Root scripts that delegate into video-url-parser/
└── video-url-parser/ # The extension itself
├── manifest.json # Manifest V3 definition
├── js/
│ ├── functions.js # Core helper utilities (unit-tested)
│ ├── constants.js # Shared constants (unit-tested)
│ └── parsevideo.js # The ParseVideo engine and site parsers (unit-tested)
├── lang/ # Popup UI translations (one file per language)
├── _locales/ # Chrome i18n messages (one folder per locale)
└── test/ # Mocha + Chai unit tests
Requirements: Node.js >= 18.
# Clone your fork
git clone https://github.com/<your-username>/VideoDownloadHelper.git
cd VideoDownloadHelper
# Install dependencies (root delegates into video-url-parser/)
npm installTo load the extension in your browser:
cd video-url-parser
npm run build # produces dist/dist.min.js (not committed)Then open chrome://extensions, enable Developer mode, click
Load unpacked and select the video-url-parser/ folder.
To create the Chrome Web Store zip package instead, run:
npm run package # writes simple-video-download-helper-<version>.zip at the repo rootRun these from the repository root or from video-url-parser/:
| Script | Description |
|---|---|
npm test |
Run the Mocha unit-test suite. |
npm run coverage |
Run the tests and enforce coverage thresholds. |
npm run lint |
Lint the source and tests with ESLint. |
npm run lint:fix |
Auto-fix lint problems where possible. |
npm run format |
Format the codebase with Prettier. |
npm run format:check |
Verify formatting without writing changes. |
npm run build |
Produce the production bundle. |
npm run package |
Build and create the extension zip at the repo root. |
npm run check |
Run lint, format check, coverage and build. |
Before opening a pull request, please make sure npm run check passes.
- Code style is enforced by ESLint (flat config) and Prettier: 4-space indentation, double quotes, semicolons, 120-character print width.
- The linters and formatter are intentionally scoped to the core library
(
js/functions.js,js/constants.js,js/parsevideo.js), the test suite and the config files. Vendored libraries and legacy UI scripts are excluded — seeeslint.config.jsand.prettierignore. Please keep those ignore lists in sync when you add files. - New behaviour in the core library should be covered by unit tests.
- The parser must remain dependency-free at runtime.
- Add a
parse_<site>_com(...)function invideo-url-parser/js/parsevideo.jsand register it in theParse()chain. - Add a spec file under
video-url-parser/test/(e.g.test_parsevideo_<site>.js) with representative HTML fixtures intest/data/. - Add the verified page to
tested-urls.txt. - Run
npm run checkand update the "Supported sites" table in the README.
The popup UI is translated via two mechanisms:
video-url-parser/lang/<code>.js— the popup UI strings. Copylang/en-us.js, translate each value, and keep the same set of keys.video-url-parser/_locales/<locale>/messages.json— the Chrome extension name/description shown in the browser.
When you add a new language to lang/, also:
- Add a
<script src="lang/<code>.js"></script>include inmain.html. - Add a
case "<code>": return (translation_<name>);injs/translate.js(get_lang()). - Add an
<option value="<code>">Native name</option>to the language<select id="lang">inmain.html.
- Use clear, imperative subject lines (e.g. "Add Vietnamese translation").
- Reference related issues where relevant (e.g. "Fixes #123").
- Keep unrelated changes in separate commits/PRs.
- Fork the repository and create a topic branch from
master. - Make your change, adding tests and documentation as appropriate.
- Ensure
npm run checkpasses locally. - Open a pull request using the template and describe what and why.
- Be responsive to review feedback — we're glad to help get your change merged.
Thank you for contributing! ❤️