Merge pull request #8 from Gregory-K/feature/google.com

Change google.co.jp to .com
This commit is contained in:
sienori 2017-11-07 12:49:33 +09:00 committed by GitHub
commit 8424825cbb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View file

@ -91,7 +91,7 @@ function translateTextMenu(info, tab) {
//ページ全体を翻訳 //ページ全体を翻訳
function translatePageMenu(info, tab) { function translatePageMenu(info, tab) {
browser.tabs.create({ browser.tabs.create({
'url': "https://translate.google.co.jp/translate?hl=" + S.get().targetLang + "&sl=auto&u=" + encodeURIComponent(info.pageUrl), 'url': "https://translate.google.com/translate?hl=" + S.get().targetLang + "&sl=auto&u=" + encodeURIComponent(info.pageUrl),
'active': true, 'active': true,
'index': tab.index + 1 'index': tab.index + 1
}); });
@ -100,7 +100,7 @@ function translatePageMenu(info, tab) {
//リンクを翻訳 //リンクを翻訳
function translateLinkMenu(info, tab) { function translateLinkMenu(info, tab) {
browser.tabs.create({ browser.tabs.create({
'url': "https://translate.google.co.jp/translate?hl=" + S.get().targetLang + "&sl=auto&u=" + encodeURIComponent(info.linkUrl), 'url': "https://translate.google.com/translate?hl=" + S.get().targetLang + "&sl=auto&u=" + encodeURIComponent(info.linkUrl),
'active': true, 'active': true,
'index': tab.index + 1 'index': tab.index + 1
}); });

View file

@ -70,7 +70,7 @@ function getSelectionWord(tabs) {
//ページ翻訳へのリンクを表示 //ページ翻訳へのリンクを表示
function showLink() { function showLink() {
document.getElementById("link").innerHTML = "<a href=https://translate.google.co.jp/translate?hl=" + targetLang + "&sl=auto&u=" + encodeURIComponent(url) + ">" + browser.i18n.getMessage('showLink') + "</a>"; document.getElementById("link").innerHTML = "<a href=https://translate.google.com/translate?hl=" + targetLang + "&sl=auto&u=" + encodeURIComponent(url) + ">" + browser.i18n.getMessage('showLink') + "</a>";
} }
//翻訳元テキストを表示 //翻訳元テキストを表示