File tree Expand file tree Collapse file tree 2 files changed +11
-17
lines changed Expand file tree Collapse file tree 2 files changed +11
-17
lines changed Original file line number Diff line number Diff line change @@ -225,7 +225,7 @@ function collectionSubMenu() {
225
225
}
226
226
227
227
function viewSubMenu ( ) {
228
- const menu = {
228
+ return {
229
229
label : '&View' ,
230
230
submenu : [
231
231
{
@@ -256,20 +256,17 @@ function viewSubMenu() {
256
256
click : function ( ) {
257
257
ipc . broadcast ( 'window:zoom-out' ) ;
258
258
}
259
+ } ,
260
+ separator ( ) ,
261
+ {
262
+ label : '&Toggle DevTools' ,
263
+ accelerator : 'Alt+CmdOrCtrl+I' ,
264
+ click : function ( ) {
265
+ BrowserWindow . getFocusedWindow ( ) . toggleDevTools ( ) ;
266
+ }
259
267
}
260
268
]
261
269
} ;
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 ;
273
270
}
274
271
275
272
function windowSubMenu ( ) {
Original file line number Diff line number Diff line change @@ -117,12 +117,10 @@ var createWindow = module.exports.create = function(opts) {
117
117
height : opts . height ,
118
118
icon : opts . icon ,
119
119
show : false ,
120
- devTools : process . env . NODE_ENV !== 'production' ,
121
120
'min-width' : opts . minwidth ,
122
121
'web-preferences' : {
123
122
'subpixel-font-scaling' : true ,
124
- 'direct-write' : true ,
125
- 'devTools' : process . env . NODE_ENV !== 'production'
123
+ 'direct-write' : true
126
124
}
127
125
} ) ;
128
126
@@ -134,8 +132,7 @@ var createWindow = module.exports.create = function(opts) {
134
132
'min-width' : opts . minwidth ,
135
133
'web-preferences' : {
136
134
'subpixel-font-scaling' : true ,
137
- 'direct-write' : true ,
138
- 'devTools' : false
135
+ 'direct-write' : true
139
136
}
140
137
} ) ;
141
138
You can’t perform that action at this time.
0 commit comments