Just include dev tools in the menu: it's handy

This commit is contained in:
David Baker 2016-10-28 12:06:55 +01:00
parent c8b39a1755
commit 56f080619e
2 changed files with 7 additions and 2 deletions

View file

@ -117,8 +117,6 @@ electron.app.on('ready', () => {
icon: `${__dirname}/../../vector/img/logo.png`,
width: 1024, height: 768,
});
// A useful one to uncomment for debugging
//mainWindow.webContents.openDevTools();
mainWindow.loadURL(`file://${__dirname}/../../vector/index.html`);
electron.Menu.setApplicationMenu(VectorMenu);

View file

@ -70,6 +70,13 @@ const template = [
},
{
role: 'togglefullscreen'
},
{
label: 'Toggle Developer Tools',
accelerator: process.platform == 'darwin' ? 'Alt+Command+I' : 'Ctrl+Shift+I',
click: function(item, focusedWindow) {
if (focusedWindow) focusedWindow.toggleDevTools();
}
}
]
},