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 11# a-translator-chrome-extension
22
3+ 一个支持 DeepL 翻译的 Chrome 插件(需自己购买 DeepL API 计划)。
4+
35## 安装
46
57### Chrome Web Store
1416
1517## 配置
1618
17- 请在插件配置页面填入 A Translator 的 [ API Token] ( https://a-translator.royli.dev/dashboard/profile ) 。
19+ 请在插件配置页面填入 DeepL 的 API Token。
1820
1921## 使用
2022
Original file line number Diff line number Diff line change @@ -49,12 +49,8 @@ class Client {
4949
5050 private getAPI ( ) : string {
5151 switch ( this . region ) {
52- case 'global' :
53- return 'https://a-translator-api-cf.nerdynerd.org'
54- case 'dev' :
55- return 'http://localhost:1337'
5652 default :
57- return 'https://a-translator- api.nerdynerd.org '
53+ return 'https://api.deepl.com '
5854 }
5955 }
6056}
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ export interface Config {
1111
1212export type SupportLanguageKeys = keyof typeof supportedLanguages
1313
14- export type APIRegions = 'default' | 'global' | 'dev'
14+ export type APIRegions = 'default'
1515
1616export type TranslateResult = {
1717 translations : Array < {
Original file line number Diff line number Diff line change @@ -132,20 +132,6 @@ const Options: React.FC = () => {
132132 />
133133 </ OptionSection >
134134
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-
149135 < OptionSection title = { '腾讯云 OCR' } >
150136 < div tw = "space-y-3" >
151137 < div >
@@ -188,15 +174,6 @@ const Options: React.FC = () => {
188174
189175 < OptionSection title = { '🔗 相关链接' } >
190176 < 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 >
200177 < li >
201178 < a
202179 tw = "text-blue-600 cursor-pointer"
You can’t perform that action at this time.
0 commit comments