🌐 Subtitles in two languages for YouTube, Netflix & Disney+
This extension works by intercepting caption file requests, parsing them, and rendering them onto the page.
The extension runs an adapter on the host site repeatedly to get up-to-date information about the state of the host. Adapters are functions that use DOM queries. You can find them in
site_integrations.
This extension does not use any internal APIs on the host site (eg.
window.netflix.appContext) and it does not change any of the host sites own code. (eg. manipulating the host site's video player bundle)
Why not?
The adapter API is still a work in progress and will be documented in the future.
This "hands off" approach has UX trade-offs, like requiring the user select a language on the host site to have the caption file requested. I believe long-term stability is more important than UX.
Since
browser_actions cannot persist any data after they are closed, this extension uses Redux middleware to store the user's settings with
chrome.storageon any change. When the popup is re-opened, the store is re-hydrated with the user's saved store settings, and settings are injected into the
content_script.
Building the extension locally requires having Node and Yarn installed. See https://nodejs.org/ and https://yarnpkg.com/ for installation steps.
chmod u+x ./build-extension.sh ./build-extension.sh
You'll need to enable Developer Mode in chrome://extensions to do this. See https://developer.chrome.com/extensions/getstarted#unpacked for more information.
cd browser_action yarn testcd content_script yarn test
cd site_integrations yarn test
MIT