Skip to content

Commit 10f7ed7

Browse files
committed
Re-enable the dev tools (#1290)
1 parent 3bfcf3c commit 10f7ed7

File tree

2 files changed

+11
-17
lines changed

2 files changed

+11
-17
lines changed

src/main/menu.js

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ function collectionSubMenu() {
225225
}
226226

227227
function viewSubMenu() {
228-
const menu = {
228+
return {
229229
label: '&View',
230230
submenu: [
231231
{
@@ -256,20 +256,17 @@ function viewSubMenu() {
256256
click: function() {
257257
ipc.broadcast('window:zoom-out');
258258
}
259+
},
260+
separator(),
261+
{
262+
label: '&Toggle DevTools',
263+
accelerator: 'Alt+CmdOrCtrl+I',
264+
click: function() {
265+
BrowserWindow.getFocusedWindow().toggleDevTools();
266+
}
259267
}
260268
]
261269
};
262-
if (process.env.NODE_ENV !== 'production') {
263-
menu.submenu.push(separator());
264-
menu.submenu.push({
265-
label: '&Toggle DevTools',
266-
accelerator: 'Alt+CmdOrCtrl+I',
267-
click: function() {
268-
BrowserWindow.getFocusedWindow().toggleDevTools();
269-
}
270-
});
271-
}
272-
return menu;
273270
}
274271

275272
function windowSubMenu() {

src/main/window-manager.js

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -117,12 +117,10 @@ var createWindow = module.exports.create = function(opts) {
117117
height: opts.height,
118118
icon: opts.icon,
119119
show: false,
120-
devTools: process.env.NODE_ENV !== 'production',
121120
'min-width': opts.minwidth,
122121
'web-preferences': {
123122
'subpixel-font-scaling': true,
124-
'direct-write': true,
125-
'devTools': process.env.NODE_ENV !== 'production'
123+
'direct-write': true
126124
}
127125
});
128126

@@ -134,8 +132,7 @@ var createWindow = module.exports.create = function(opts) {
134132
'min-width': opts.minwidth,
135133
'web-preferences': {
136134
'subpixel-font-scaling': true,
137-
'direct-write': true,
138-
'devTools': false
135+
'direct-write': true
139136
}
140137
});
141138

0 commit comments

Comments
 (0)