Skip to content

Commit

Permalink
Merge pull request #49 from rishiqing/add-console
Browse files Browse the repository at this point in the history
log--增加console
  • Loading branch information
wgm7512 authored May 19, 2020
2 parents ce1e2bd + e1a9796 commit 2b04177
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ function createWindow () {
// 部分 API 在 ready 事件触发后才能使用。
app.on('ready', () => {
createWindow()
// registerShortcut() // 注册快捷键
registerShortcut() // 注册快捷键
autoUpdata() // 自动更新
setContextmenu(win.webContents) // 设置右击菜单
isDomReady(win.webContents) // 刷新后 dom 加载完成执行的事件
Expand Down Expand Up @@ -128,12 +128,12 @@ function behindInstanceJavaScript(contents) {

/** 注册快捷键 */
function registerShortcut() {
globalShortcut.register('CommandOrControl+I', () => {
globalShortcut.register('CommandOrControl+P', () => {
// 打开开发者工具
win.webContents.openDevTools()
})

if (!globalShortcut.isRegistered('CommandOrControl+I')) {
if (!globalShortcut.isRegistered('CommandOrControl+P')) {
globalShortcut.register('CommandOrControl+P', () => {
// 打开开发者工具
win.webContents.openDevTools()
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "tingkelai-electron",
"version": "1.0.8",
"version": "1.0.9",
"description": "听客来PC客户端",
"main": "main.js",
"author": "南京听客来信息技术有限公司",
Expand Down

0 comments on commit 2b04177

Please sign in to comment.