-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
33 changed files
with
14,930 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"plugins": [ | ||
[ | ||
"module-resolver", | ||
{ | ||
"root": ["./src"] | ||
} | ||
] | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
dist/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
{ | ||
"env": { | ||
"browser": true, | ||
"es2021": true | ||
}, | ||
"extends": ["standard"], | ||
"parserOptions": { | ||
"ecmaVersion": 12, | ||
"sourceType": "module" | ||
}, | ||
"parser": "babel-eslint", | ||
"rules": { | ||
"semi": [2, "always"], | ||
"comma-dangle": [2, "always-multiline"], | ||
"space-before-function-paren": ["error", "never"], | ||
"eqeqeq": ["warn", "always"], | ||
"indent": [ | ||
"warn", | ||
4, | ||
{ | ||
"ArrayExpression": "first", | ||
"CallExpression": { "arguments": "first" }, | ||
"MemberExpression": "off", | ||
"ObjectExpression": "off", | ||
"ignoreComments": true, | ||
"ignoredNodes": ["AssignmentExpression:has(Literal)"] | ||
} | ||
], | ||
"getter-return": "off", | ||
"no-control-regex": "off", | ||
"no-empty": ["error", { "allowEmptyCatch": true }], | ||
"no-promise-executor-return": ["error"], | ||
"no-template-curly-in-string": ["error"], | ||
"no-unreachable-loop": ["error"], | ||
"no-useless-backreference": ["error"], | ||
"no-useless-escape": "off", | ||
"require-atomic-updates": ["warn"] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
node_modules | ||
dist |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"trailingComma": "all", | ||
"tabWidth": 4, | ||
"singleQuote": true, | ||
"printWidth": 120, | ||
"arrowParens": "always" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,60 @@ | ||
# auto-translate-youtube-subtitles | ||
this extension replaces the default youtube subtitles with one customized that allows you to select a word and translates it for you | ||
# Auto Translate Youtube Subtitles | ||
|
||
This extension replaces the default youtube subtitles with one customized that allows you to select a word and translates it for you. | ||
|
||
Only tested in chrome and brave. | ||
|
||
## Features | ||
* Auto selection translated subtitles | ||
* Auto selection auto-translate subtitles | ||
* Translate a selected word in the subtitles | ||
|
||
although youtube already implements these functionalities, I made this extension to practice. | ||
|
||
## Installation | ||
|
||
1. Go to chrome://extensions/ | ||
2. Activate the "Developer mode" option | ||
3. Load the extension in "Load unpacked" | ||
4. (Optional) Go to "details" and activate "Allow in Private" | ||
|
||
## Translation | ||
|
||
Translations are obtained from google translator and other services (deepl, bing). | ||
|
||
By default deepl is used, since google translator has a limit for translating. | ||
|
||
## Screenshots | ||
|
||
Auto selection translated subtitles | ||
|
||
![1 1](https://user-images.githubusercontent.com/58922368/129124811-9fb6ce42-3913-453d-9039-327975196148.png) | ||
|
||
Auto selection auto-translate subtitles | ||
|
||
![1](https://user-images.githubusercontent.com/58922368/129126665-06bb69a4-362a-400e-9582-38c8b139b88b.png) | ||
|
||
Translation with google | ||
|
||
![3](https://user-images.githubusercontent.com/58922368/129124995-29ee537d-566c-4ab7-9756-e65f661a7059.png) | ||
|
||
Translation with deepl | ||
|
||
![4](https://user-images.githubusercontent.com/58922368/129125085-0fceb0c7-102f-41b3-8557-0cb4c184b754.png) | ||
|
||
The functionality to move the subtitles to any part of the player is preserved | ||
|
||
![5](https://user-images.githubusercontent.com/58922368/129125224-4552b26b-252e-4ee3-869b-913f91b6e780.png) | ||
|
||
Home | ||
|
||
![6](https://user-images.githubusercontent.com/58922368/129125463-d6840a4e-efd4-4b6f-a8a9-c11a95b84bfb.png) | ||
|
||
Set up translation | ||
|
||
![7](https://user-images.githubusercontent.com/58922368/129125472-bd17a63f-014e-4f66-a19c-e7d50938bb3a.png) | ||
|
||
Miscellaneous data | ||
|
||
![8](https://user-images.githubusercontent.com/58922368/129125494-dd11a200-1f04-4f19-8d4a-18fe930b9ee4.png) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"compilerOptions": { | ||
"target": "ES6", | ||
"baseUrl": "./src", | ||
"paths": { | ||
"*": ["src/*"] | ||
} | ||
}, | ||
"exclude": ["node_modules"] | ||
} |
Oops, something went wrong.