Skip to content
New issue

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

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

Already on GitHub? # to your account

可以使用本地字典吗? #73

Open
fengdh opened this issue Jan 7, 2016 · 3 comments
Open

可以使用本地字典吗? #73

fengdh opened this issue Jan 7, 2016 · 3 comments

Comments

@fengdh
Copy link

fengdh commented Jan 7, 2016

比如mdict mdd/mdx 格式。
我是 mdict-js (https://github.com/fengdh/mdict-js/) 的作者,希望能有机会合作加入对本地字典的支持。

现在只能做到从本地选择字典文件,但不太清楚如何从Chrome插件或应用中从配置好的字典路径自动装载。

Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

@xhacker
Copy link
Member

xhacker commented Jan 10, 2016

可能出于安全原因不能自动装载?可以在第一次选择的时候通过某种途径保存在 app 里。

@fengdh
Copy link
Author

fengdh commented Jan 12, 2016

我知道Chrome App可以有本地文件权限,但是插件API并不支持。当然每次chrome启动时可以指定装载字典文件,可是有没有办法让指定的File Object能被在下一次chrome启动时识别,否则对用户太不友好?

如果把字典拷贝到plugin里,也许可行。但是有的字典文件很大比较浪费空间。另外我写的mdict-js以文件为对象,只读取字典相应部分来减少内存使用和初次调用时间,并保持足够快的查询速度。不知道以 chrome://{plugin_id}/{path}的形式可不可以使用partial access?

@xhacker
Copy link
Member

xhacker commented Jan 27, 2016

App 对本地文件对权限具体是什么样的?有相关文档么?如果有必要,做成 app 的形式也可以。虽然我自己更倾向插件形式。

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

No branches or pull requests

2 participants