diff --git a/README.md b/README.md index 07d4514..9d7f043 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ yDic是一个轻量级、易用的电脑端词典解决方案。 ## 致谢名单 -### 使用以下依赖包: +### 使用以下依赖包 - Electron, Electron, MIT License. - request, request, Apache-2.0 License. @@ -20,14 +20,14 @@ yDic是一个轻量级、易用的电脑端词典解决方案。 - electron-store, Sindre Sorhus, MIT License. - electron-builder, Electron Userland, MIT License. -### 使用以下API: +### 使用以下API - 有道智云, ©2017 网易公司, [许可协议](https://youdao.com/terms). - Merriam-Webster Advanced English Learner's Dictionary API, © 2018 Merriam-Webster Incorporated, [许可协议](https://dictionaryapi.com/info/terms-of-service). - 百度翻译开放平台, © 2018 Baidu, [许可协议](https://fanyi-api.baidu.com/api/trans/product/apidoc). - 必应词典, © 2019 Microsoft, [许可协议](https://www.microsoft.com/zh-cn/servicesagreement). -### 使用以下资源: +### 使用以下资源 - Modern UI Icons, Austin Andrews, Creative Commons Attribution-Share Alike 3.0 Unported License. - Source Han Sans, Adobe Fonts, SIL Open Font License 1.1. @@ -35,4 +35,4 @@ yDic是一个轻量级、易用的电脑端词典解决方案。 感谢这些项目的开发者/开发公司,没有他们,这个项目就不可能实现。 -Copyright (c) 2018-2019 [Roderick Qiu](https://roderickqiu.scris.top/). \ No newline at end of file +Copyright (c) 2018-2019 [Roderick Qiu](https://roderickqiu.scris.top/). diff --git a/index.html b/index.html index f6e8bd9..e75b44e 100644 --- a/index.html +++ b/index.html @@ -7,7 +7,11 @@ - + - + @@ -17,6 +20,14 @@ var ipc = require('electron').ipcRenderer; ipc.send('window-dict');//调整尺寸 $(document).ready(function () { + var Mousetrap = require('mousetrap'); + Mousetrap.bind(['command+b', 'ctrl+b'], function () { + ipc.send("back-home"); + + // return false to prevent default browser behavior + // and stop event from bubbling + return false; + }); $("#detail").css("display", "block"); s = location.search.substr(1); a = s.split('&'); diff --git a/searcher-e2c.html b/searcher-e2c.html index f9a51d4..db95871 100644 --- a/searcher-e2c.html +++ b/searcher-e2c.html @@ -7,8 +7,11 @@ - - + @@ -17,6 +20,14 @@ var ipc = require('electron').ipcRenderer; ipc.send('window-dict');//调整尺寸 $(document).ready(function () { + var Mousetrap = require('mousetrap'); + Mousetrap.bind(['command+b', 'ctrl+b'], function () { + ipc.send("back-home"); + + // return false to prevent default browser behavior + // and stop event from bubbling + return false; + }); s = location.search.substr(1); a = s.split('&'); var wordIn = ''; diff --git a/searcher-e2e.html b/searcher-e2e.html index ce95686..d7ace55 100644 --- a/searcher-e2e.html +++ b/searcher-e2e.html @@ -7,7 +7,11 @@ - + @@ -16,6 +20,14 @@ var ipc = require('electron').ipcRenderer; ipc.send('window-englishExplains');//调整尺寸 $(document).ready(function () { + var Mousetrap = require('mousetrap'); + Mousetrap.bind(['command+b', 'ctrl+b'], function () { + ipc.send("back-home"); + + // return false to prevent default browser behavior + // and stop event from bubbling + return false; + }); s = location.search.substr(1); a = s.split('&'); var wordIn = ''; @@ -129,7 +141,8 @@
- +