• 请不要在回答技术问题时复制粘贴 AI 生成的内容
nosugar
V2EX  ›  程序员

​ 274 行集:必应、谷歌、有道、百度划词翻译脚本,你又可以删掉一个扩展了 chrome&firefox

  •  
  •   nosugar · Oct 23, 2017 · 7006 views
    This topic created in 3312 days ago, the information mentioned may be changed or developed.

    一个比较实用的划词翻译脚本

    效果还不错 https://github.com/barrer/tampermonkey-script/blob/master/translate/translate.gif

    脚本 https://github.com/barrer/tampermonkey-script/tree/master/translate

    安装 https://github.com/barrer/tampermonkey-script/blob/master/README.md

    自用还是够用的,有个人定制需求的 fork 后自己改改,根据具体情况再决定是否 push 到主分支,代码以简单实用为主,欢迎大佬改进!👏

    Supplement 1  ·  Oct 23, 2017
    后面改了一些 bug 可能稍微多于 274 行
    Supplement 2  ·  Jan 2, 2018
    重构了下,有发音了,兼容性很好
    21 replies  •  2018-01-02 18:40:24 +08:00
    andawp
    andawp
    Oct 23, 2017❤️1
    1
    换成 mouseover 事件,感觉方便些
    anyclue
    anyclue
    Oct 23, 2017❤️2
    2
    加个朗读发音我就换了
    xiaotianhu
    xiaotianhu
    Oct 23, 2017
    3
    希望有 safari 版本...
    mac safari 还是好用 就是缺个这个插件...
    BearD01001
    BearD01001
    Oct 23, 2017
    4
    @anyclue #2 加个朗读发音我就换了 +1
    muren
    muren
    Oct 23, 2017
    5
    还得去点一下,差评
    Mitt
    Mitt
    Oct 23, 2017
    6
    mouseover 和自动翻译都有个问题。。。mouseover 算法不好会导致性能问题, 自动翻译的话比如我这种手残党,喜欢没事就划几个字高亮一下 (>﹏<)
    guonning
    guonning
    Oct 23, 2017 via Android
    7
    最近用百度翻译,挺好用
    CuminLo
    CuminLo
    Oct 23, 2017❤️2
    8
    可以加发音么?

    现在用的是 https://greasyfork.org/en/scripts/12758-youdaodict 这个,主要就是有发音功能....
    kingboy9525
    kingboy9525
    Oct 23, 2017
    9
    @CuminLo #8 感谢推荐,这个脚本不错~
    kingboy9525
    kingboy9525
    Oct 23, 2017
    10
    加上发音就完美了~另外色调和字体可以考虑调一下。例如橙色可以稍微淡一点
    YzSama
    YzSama
    Oct 23, 2017
    11
    @CuminLo #8 已装。比较常用的是谷歌插件 划词翻译
    liweicomeon
    liweicomeon
    Oct 23, 2017❤️1
    12
    https://github.com/Selection-Translator/crx-selection-translate

    我觉得这个很好用,包含所有接口,有发音
    kookxiang
    kookxiang
    Oct 23, 2017
    13
    扩展性能和方便程度都比脚本好很多
    505243267
    505243267
    Oct 23, 2017 via iPad
    14
    @xiaotianhu 这是个 tampermonkey 脚本,safari 去 https://tampermonkey.net 下载插件后即可安装脚本。
    nosmile
    nosmile
    Oct 23, 2017
    16
    自用的 google 翻译,可以满足基本需要
    nosugar
    nosugar
    OP
    Oct 23, 2017
    17
    @andawp moseover 太耗 cpu 啦
    nosugar
    nosugar
    OP
    Oct 23, 2017
    18
    @anyclue
    @BearD01001
    @CuminLo
    @kingboy9525
    发音考虑的兼容 http、https,看看后续有没有大佬贡献代码
    cye3s
    cye3s
    Oct 23, 2017
    19
    我在用这个,主要是可以设置开关,不会默认打开取词
    https://github.com/HalfdogStudio/youdaodict
    anson2416
    anson2416
    Oct 23, 2017
    20
    @cye3s 安装了之后,怎样才能触发翻译啊?插件已经打开。
    nosugar
    nosugar
    OP
    Jan 2, 2018
    21
    @anyclue
    @xiaotianhu
    @BearD01001
    @CuminLo
    @YzSama
    @liweicomeon
    @kookxiang
    @Haiwx
    @nosmile
    @cye3s
    @anson2416

    重构了下,有发音了,兼容性很好
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   2398 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 113ms · UTC 04:51 · PVG 12:51 · LAX 20:51 · JFK 23:51
    ♥ Do have faith in what you're doing.