1
0
mirror of https://github.com/BoostIo/Boostnote synced 2025-12-13 09:46:22 +00:00

move devtool to main-menu

This commit is contained in:
Rokt33r
2016-04-18 04:37:00 +09:00
parent 8c236cb5cb
commit 65c969a321
2 changed files with 10 additions and 9 deletions

View File

@@ -10,15 +10,6 @@ import activityRecord from 'browser/lib/activityRecord'
const electron = require('electron') const electron = require('electron')
const ipc = electron.ipcRenderer const ipc = electron.ipcRenderer
const path = require('path') const path = require('path')
const remote = electron.remote
if (process.env.NODE_ENV !== 'production') {
window.addEventListener('keydown', function (e) {
if (e.keyCode === 73 && e.metaKey && e.altKey) {
remote.getCurrentWindow().toggleDevTools()
}
})
}
activityRecord.init() activityRecord.init()
window.addEventListener('online', function () { window.addEventListener('online', function () {

View File

@@ -146,6 +146,16 @@ var view = {
click: function () { click: function () {
BrowserWindow.getFocusedWindow().reload() BrowserWindow.getFocusedWindow().reload()
} }
},
{
label: 'Toggle Developer Tools',
accelerator: (function () {
if (process.platform === 'darwin') return 'Command+Alt+I'
else return 'Ctrl+Shift+I'
})(),
click: function () {
BrowserWindow.getFocusedWindow().toggleDevTools()
}
} }
] ]
} }