PS: This "gist" is the same situation that I described before to solve a simple problem that I went trought. See more on link: https://gist.github.com/marlonklc/4adad7dad5e677e121f4c17a0a2503e0
I have this brillant(shit) idea when I was watching series/movies on netflix and I tried to select any text, but they don't allow you select any text on subtitles. So, I thought in my mind "hey, I'm a programmer I'm able to that brillant(shit) things", so that is the result 😃
This script create a button on middle bottom on screen (it doesn't interfere with reading the subtitles, I tested it, trust in me 😉) and when you click on it, it's trigger a event to get the current text from scene and copy the text to your clipboard.
Updated (05/11/2022)
I have improved this script to that is possible show a popup to auto translate the subtitles, using google translator API. So that way you don't need change tabs or go to site for translate the text.
Updated (29/04/2023)
Fixed problem to translate correctly when subtitles are in different parent elements. Also improved how the translation works on google api.
- First thing you need to enable subtitles, like show on result image.
- Configures what source and target language (need to pass this properties to google translator) on script above (0-netflix-subtitles-script.js) by SOURCE_LANGUAGE and TARGET_LANGUAGE variables.
- Copy the final script (editable for you) and paste this script after the command
javascript: <script>
on browser url bar and press enter. Example below: - After step three, you will look a button that copy the subtitles and show a popup on left side with text translated.
Well, this made it easier to copy the subtitles and translate some words that I didn't know.
So, I hope it helpful for you as was for me. PS: Let's feel free to copy or improve it, or left your comment. Cheers!