A Chrome extension that displays dual-language subtitles on YouTube. It intercepts YouTube's subtitle API requests and renders a second subtitle language directly on the video player as a reliable overlay, working seamlessly even with auto-generated captions.
Dual Subtitle/
├── manifest.json # Extension configuration and permissions
├── background.js # Background service worker for handling network requests
├── content.js # Core script for subtitle extraction and video overlay
├── inject.js # XHR interceptor to capture subtitle data from YouTube
├── popup.html # Extension popup UI structure
└── popup.js # Popup logic and settings management
Since this extension is installed locally (not from the Chrome Web Store), follow these steps to load it:
- Download the extension: Click the green Code button at the top of this repository and select Download ZIP, or clone the repository using
git:git clone https://github.com/Maaz2212/Youtube_Dual_Subtitle.git
- Extract the files: If you downloaded the ZIP, extract it to a permanent location on your computer.
- Open Chrome Extensions: Open Google Chrome and navigate to
chrome://extensions/in your address bar. - Enable Developer Mode: Toggle the Developer mode switch in the top right corner of the page.
- Load the extension: Click the Load unpacked button in the top left and select the folder you extracted/cloned.
(Tip: Pin the extension to your toolbar by clicking the puzzle piece icon next to your Chrome profile picture for easy access.)
- Go to YouTube and play a video.
- Turn on the video's default subtitles by clicking the CC button on the video player. (Note: The video must have subtitles available, including auto-generated ones. If a video does not have any subtitles at all, the extension cannot generate them).
- Click the Dual Subtitle extension icon in your Chrome toolbar.
- From the extension popup, configure your Primary Language and Secondary Language.
- The extension will automatically retrieve and display the secondary subtitles on the video. You can toggle the feature on or off directly from the popup menu!