Created
April 3, 2018 08:59
-
-
Save tksugimoto/a5b5c3e5dcc8ba5c30efe9bfa79de546 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
javascript: (() => { | |
const query = Object.entries({ | |
/* 元の言語 */ | |
sl: 'en', | |
/* 翻訳する言語 */ | |
tl: 'ja', | |
u: document.URL, | |
/* 原文を表示する */ | |
anno: 2, | |
}).map(([key, value]) => { | |
return `${encodeURIComponent(key)}=${encodeURIComponent(value)}`; | |
}).join("&"); | |
window.open(`https://translate.google.co.jp/translate?${query}`); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment