Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

【建议】有道网页查词增强 #99

Closed
orz12 opened this issue May 1, 2018 · 4 comments
Closed

【建议】有道网页查词增强 #99

orz12 opened this issue May 1, 2018 · 4 comments

Comments

@orz12
Copy link

orz12 commented May 1, 2018

1、无论翻译 http 还是 https,有道的api都会被chrome(我这里是68.0.3416.1(正式版本)canary-dcheck (32 位))标记为危险并直接拦截。建议首次使用前,测试不能访问后,提示用户打开该网址并手动允许,然后,启用命令行--allow-running-insecure-content。

2、(重要!)能否开启一个自动模式,也即,在开启后,所有打开的新页面都自动调用有道网页翻译?

3、能否模仿原版的有道翻译制作一个js书签,原版为:javascript: void((function() {var element = document.createElement('script');element.id = 'outfox_seed_js';element.charset = 'utf-8',element.setAttribute('src', 'http://fanyi.youdao.com/web2/seed.js?' + Date.parse(new Date()));document.body.appendChild(element);})()),点击后直接拉起插件增强版的翻译功能,而不使用原版

@crimx
Copy link
Owner

crimx commented May 2, 2018

嗨,谢谢反馈。

  1. 我会去看看是什么问题。
  2. 这个功能有些小众了。你可以把右键词典都清掉只保留有道,这样有道网页翻译就会出现在一级菜单。Shift+F10 可以快速打开右键菜单。
  3. 这个我没有时间研究,但感觉是不可行的。扩展脚本在隔离的环境执行,书签应该不能注入。

@crimx
Copy link
Owner

crimx commented May 2, 2018

嗯,问题是 canary 不再信任有道网页翻译网站的 certificate 。我当时 hack 的时候是将原来的资源都从 http 换成了 https ,我试试改回去。

@orz12
Copy link
Author

orz12 commented May 4, 2018

非常感谢您。期待下一次更新

@orz12
Copy link
Author

orz12 commented May 10, 2018

我这里还可以用。具体操作方法是
打开console,找到fanyi.youdao.com被拦截的错误提示,点击进入后,chrome将提示不安全,然后点高级,继续访问,取消掉下载,再回到原页面刷新,即可使用很长一段时间(https)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants