【笔记】利用谷歌翻译将网页翻译成中文

前言

利用谷歌翻译(Google Translate)将网页翻译成中文
因为使用的谷歌翻译进行网页翻译,所以不限制操作系统及浏览器

脚本

  • 在网页追加js代码
1
javascript:var t=((window.getSelection&&window.getSelection())||(document.getSelection&&document.getSelection())||(document.selection&&document.selection.createRange&&document.selection.createRange().text));var e=(document.charset||document.characterSet);if(t!=''){location.href='http://translate.google.com/?text='+t+'&hl=zh-CN&langpair=auto|zh-CN&tbb=1&ie='+e;}else{location.href='http://translate.google.com/translate?u='+encodeURIComponent(location.href)+'&hl=zh-CN&langpair=auto|zh-CN&tbb=1&ie='+e;};

完成

参考文献

博客园——囧囧(>_<)