Skip to content

Commit 4a2523b

Browse files
LKLK
authored andcommitted
Consider GFW, use translate.google.cn
1 parent abdf110 commit 4a2523b

File tree

2 files changed

+7
-9
lines changed

2 files changed

+7
-9
lines changed
Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,14 @@
11
// LaunchBar Action Script
22

33
function run() {
4-
LaunchBar.openURL('https://translate.google.com')
4+
LaunchBar.openURL('https://translate.google.cn')
55
}
66

7-
function runWithString(argument)
8-
{
9-
var url = 'https://translate.google.com/#auto/zh-CN/'
10-
if (LaunchBar.options.commandKey) {
11-
url = 'https://translate.google.com/#auto/en/'
12-
}
7+
function runWithString(argument) {
8+
var url = 'https://translate.google.cn/#auto/zh-CN/'
9+
if (LaunchBar.options.commandKey) {
10+
url = 'https://translate.google.cn/#auto/en/'
11+
}
1312

14-
LaunchBar.openURL(url + encodeURIComponent(argument));
13+
LaunchBar.openURL(url + encodeURIComponent(argument));
1514
}

Google Translate.lbaction/Contents/Scripts/suggestions.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ function runWithString(argument) {
33
var sourceLang = 'auto'
44
var targetLang = 'zh-CN'
55
if (!/[a-zA-Z]/.test(argument)) {
6-
sourceLang = 'auto'
76
targetLang = 'en'
87
}
98
// dt 跟 ie 参数很重要

0 commit comments

Comments
 (0)