Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Joel2B committed Aug 12, 2021
1 parent f54bb48 commit 245993c
Show file tree
Hide file tree
Showing 33 changed files with 14,930 additions and 23 deletions.
10 changes: 10 additions & 0 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"plugins": [
[
"module-resolver",
{
"root": ["./src"]
}
]
]
}
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
dist/*
39 changes: 39 additions & 0 deletions .eslintrc.json
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"]
}
}
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
node_modules
dist
7 changes: 7 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"trailingComma": "all",
"tabWidth": 4,
"singleQuote": true,
"printWidth": 120,
"arrowParens": "always"
}
21 changes: 0 additions & 21 deletions LICENSE

This file was deleted.

62 changes: 60 additions & 2 deletions README.md
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)

10 changes: 10 additions & 0 deletions jsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"compilerOptions": {
"target": "ES6",
"baseUrl": "./src",
"paths": {
"*": ["src/*"]
}
},
"exclude": ["node_modules"]
}
Loading

0 comments on commit 245993c

Please sign in to comment.