This repository was archived by the owner on Aug 16, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 4 files changed +5
-30
lines changed Expand file tree Collapse file tree 4 files changed +5
-30
lines changed Original file line number Diff line number Diff line change 1
1
# a-translator-chrome-extension
2
2
3
+ 一个支持 DeepL 翻译的 Chrome 插件(需自己购买 DeepL API 计划)。
4
+
3
5
## 安装
4
6
5
7
### Chrome Web Store
14
16
15
17
## 配置
16
18
17
- 请在插件配置页面填入 A Translator 的 [ API Token] ( https://a-translator.royli.dev/dashboard/profile ) 。
19
+ 请在插件配置页面填入 DeepL 的 API Token。
18
20
19
21
## 使用
20
22
Original file line number Diff line number Diff line change @@ -49,12 +49,8 @@ class Client {
49
49
50
50
private getAPI ( ) : string {
51
51
switch ( this . region ) {
52
- case 'global' :
53
- return 'https://a-translator-api-cf.nerdynerd.org'
54
- case 'dev' :
55
- return 'http://localhost:1337'
56
52
default :
57
- return 'https://a-translator- api.nerdynerd.org '
53
+ return 'https://api.deepl.com '
58
54
}
59
55
}
60
56
}
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ export interface Config {
11
11
12
12
export type SupportLanguageKeys = keyof typeof supportedLanguages
13
13
14
- export type APIRegions = 'default' | 'global' | 'dev'
14
+ export type APIRegions = 'default'
15
15
16
16
export type TranslateResult = {
17
17
translations : Array < {
Original file line number Diff line number Diff line change @@ -132,20 +132,6 @@ const Options: React.FC = () => {
132
132
/>
133
133
</ OptionSection >
134
134
135
- < OptionSection title = { 'API 地区' } >
136
- < select
137
- tw = "px-4 py-3 rounded-md"
138
- name = "region"
139
- value = { region }
140
- onChange = { ( e ) => setRegion ( e . target . value as APIRegions ) } >
141
- < option value = "default" > 默认</ option >
142
- < option value = "global" > 全球(非亚洲地区)</ option >
143
- { process . env . NODE_ENV !== 'production' ? (
144
- < option value = "dev" > DEV</ option >
145
- ) : undefined }
146
- </ select >
147
- </ OptionSection >
148
-
149
135
< OptionSection title = { '腾讯云 OCR' } >
150
136
< div tw = "space-y-3" >
151
137
< div >
@@ -188,15 +174,6 @@ const Options: React.FC = () => {
188
174
189
175
< OptionSection title = { '🔗 相关链接' } >
190
176
< ul tw = "space-y-2" >
191
- < li >
192
- < a
193
- tw = "text-blue-600 cursor-pointer"
194
- href = "https://a-translator.royli.dev/dashboard"
195
- target = "_blank"
196
- rel = "noreferrer" >
197
- → 后台
198
- </ a >
199
- </ li >
200
177
< li >
201
178
< a
202
179
tw = "text-blue-600 cursor-pointer"
You can’t perform that action at this time.
0 commit comments