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() {
225225}
226226
227227function 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
275272function windowSubMenu ( ) {
Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments