Skip to content

Commit a2a11e4

Browse files
committed
Disabled auto-console opening upon app load
1 parent 9377f13 commit a2a11e4

File tree

1 file changed

+15
-14
lines changed

1 file changed

+15
-14
lines changed

main.js

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,6 @@ function redo() {
5555
mainWindow.webContents.send('redo');
5656
}
5757

58-
5958
function toggleTutorial() {
6059
mainWindow.webContents.send('tutorial_clicked');
6160
}
@@ -122,16 +121,17 @@ const createWindow = () => {
122121
{
123122
label: 'Edit',
124123
submenu: [
125-
{
124+
{
126125
label: 'Undo',
127-
accelerator: process.platform === 'darwin' ? 'Cmd+Z' : 'Ctrl+Z', //these hotkeys are a tad bit glitchy
126+
accelerator: process.platform === 'darwin' ? 'Cmd+Z' : 'Ctrl+Z', //these hotkeys are a tad bit glitchy
128127
click() {
129128
undo();
130129
}
131130
},
132-
{
131+
{
133132
label: 'Redo',
134-
accelerator: process.platform === 'darwin' ? 'Cmd+Shift+Z' : 'Ctrl+Shift+Z',
133+
accelerator:
134+
process.platform === 'darwin' ? 'Cmd+Shift+Z' : 'Ctrl+Shift+Z',
135135
click() {
136136
redo();
137137
}
@@ -142,8 +142,8 @@ const createWindow = () => {
142142
{ role: 'paste' },
143143
{ role: 'pasteandmatchstyle' },
144144
{ role: 'delete' },
145-
{ role: 'selectall' },
146-
],
145+
{ role: 'selectall' }
146+
]
147147
},
148148
{
149149
label: 'View',
@@ -172,9 +172,9 @@ const createWindow = () => {
172172
}
173173
},
174174
{
175-
label: 'Tutorial',
176-
click() {
177-
toggleTutorial();
175+
label: 'Tutorial',
176+
click() {
177+
toggleTutorial();
178178
}
179179
}
180180
]
@@ -242,10 +242,11 @@ const createWindow = () => {
242242
mainWindow = null;
243243
});
244244

245+
// UNCOMMENT THIS DURING DEVELOPMENT TO ENABLE CONSOLE TO OPEN UPON LAUNCH
245246
// dev tools opened on every browser creation
246-
mainWindow.webContents.once('dom-ready', () => {
247-
mainWindow.webContents.openDevTools();
248-
});
247+
// mainWindow.webContents.once('dom-ready', () => {
248+
// mainWindow.webContents.openDevTools();
249+
// });
249250
};
250251

251252
// This method will be called when Electron has finished
@@ -269,7 +270,7 @@ app.on('ready', () => {
269270
}
270271
globalShortcut.register('Escape', () => {
271272
escape();
272-
})
273+
});
273274
});
274275

275276
// Quit when all windows are closed.

0 commit comments

Comments
 (0)