GithubHelp home page GithubHelp logo

tiyife / e-saladict Goto Github PK

View Code? Open in Web Editor NEW

This project forked from xinshangshangxin/e-saladict

0.0 0.0 0.0 2.76 MB

使用electron打包的沙拉词典,可以脱离浏览器使用沙拉词典

JavaScript 75.80% HTML 24.20%

e-saladict's Introduction

e-saladict

一个使用 electron 打包的 沙拉词典

release

界面

assets assets

Q&A

  • 快捷键查词

    选中单词或句子, 按Alt+Control+L

  • 快捷键查词只打开了词典, 但是没有查询选中单词(即复制选中内容失败)(每次安装都会出现)

    从菜单中 打开权限设置
    assets
    或者 打开系统设置 -> 安全 -> 辅助功能 assets
    勾选 e-saladict(如果已经勾选, 先取消再勾选, 如果找不到, 请手动添加) assets

  • 原理

    参考了issues/827, 使用了webextensions-emulator模拟 chrome extension 环境, electron 开启 webSecurity: false 允许跨域访问

  • 配合 alfred 快捷键查词

    下载 Workflow, 双击后导入, 打开 Workflow 设置快捷键 assets

  • 出现卡顿

    开启了 辅助功能 导致的, 待后续调查
    如果 配合 alfred 快捷键查词, 可以在辅助功能中关闭权限避免卡顿

  • 没有 Windows 版本, 只有 Mac 版本吗?

    当前代码理论上可以构建, 但由于没有测试环境, 无法确认, 欢迎 PR

本地开发

# clone 本项目
git clone https://github.com/xinshangshangxin/e-saladict.git
# 安装本项目依赖
npm install
npm run rebuild

# clone WebextensionsEmulator 源码
git clone https://github.com/crimx/webextensions-emulator.git
# 替换 WebextensionsEmulator 以适配 ext-saladict
node pre-build/index.js WebextensionsEmulator
# 构建 WebextensionsEmulator
cd webextensions-emulator
npm install
npm run build
cd ..

# clone 沙拉词典源码
git clone https://github.com/crimx/ext-saladict.git
# 构建沙拉词典
cd ext-saladict
# 原作者是用 yarn, 这边不能使用 npm install
yarn
npm run build
cd ..

# 组合 saladict 和 WebextensionsEmulator
rm -rf ext-saladict/build/chrome/mock
mkdir -p ext-saladict/build/chrome/mock
cp webextensions-emulator/dist/** ext-saladict/build/chrome/mock
node pre-build/index.js

# 启动本地 electron
npm start

Thanks

沙拉词典
不安装浏览器也可以使用沙拉查词
webextensions-emulator

e-saladict's People

Contributors

xinshangshangxin avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.