11// Modules to control application life and create native browser window
2- const { app, BrowserWindow } = require ( "electron" ) ;
3- const path = require ( "path" ) ;
2+ const { app, BrowserWindow } = require ( "electron" )
3+ const path = require ( "path" )
44// const displays = require("displays")();
55function createWindow ( ) {
66 // Create the browser window.
@@ -20,10 +20,10 @@ function createWindow() {
2020 preload : path . join ( __dirname , "preload.js" ) ,
2121 webviewTag : true ,
2222 } ,
23- } ) ;
23+ } )
2424
2525 // and load the index.html of the app.
26- mainWindow . loadFile ( "./index.html" ) ;
26+ mainWindow . loadFile ( "./index.html" )
2727
2828 // Open the DevTools.
2929 // mainWindow.webContents.openDevTools()
@@ -33,21 +33,21 @@ function createWindow() {
3333// initialization and is ready to create browser windows.
3434// Some APIs can only be used after this event occurs.
3535app . whenReady ( ) . then ( ( ) => {
36- createWindow ( ) ;
36+ createWindow ( )
3737
3838 app . on ( "activate" , function ( ) {
3939 // On macOS it's common to re-create a window in the app when the
4040 // dock icon is clicked and there are no other windows open.
41- if ( BrowserWindow . getAllWindows ( ) . length === 0 ) createWindow ( ) ;
42- } ) ;
43- } ) ;
41+ if ( BrowserWindow . getAllWindows ( ) . length === 0 ) createWindow ( )
42+ } )
43+ } )
4444
4545// Quit when all windows are closed, except on macOS. There, it's common
4646// for applications and their menu bar to stay active until the user quits
4747// explicitly with Cmd + Q.
4848app . on ( "window-all-closed" , function ( ) {
49- if ( process . platform !== "darwin" ) app . quit ( ) ;
50- } ) ;
49+ if ( process . platform !== "darwin" ) app . quit ( )
50+ } )
5151
5252// In this file you can include the rest of your app's specific main process
5353// code. You can also put them in separate files and require them here.
0 commit comments