1 const {app, BrowserWindow} = require('electron'); // Module to control application life.
2 console.log('ElectronExtensionManager');
3 // Report crashes to our server.
4 //require('crash-reporter').start();
6 // Keep a global reference of the window object, if you don't, the window will
7 // be closed automatically when the JavaScript object is garbage collected.
10 // Quit when all windows are closed.
11 app.on('window-all-closed', function() {
12 // On OS X it is common for applications and their menu bar
13 // to stay active until the user quits explicitly with Cmd + Q
14 if (process.platform != 'darwin') {
19 // This method will be called when Electron has finished
20 // initialization and is ready to create browser windows.
21 app.on('ready', function() {
23 // Create the browser window.
24 mainWindow = new BrowserWindow({
32 // and load the index.html of the app.
33 mainWindow.loadURL('file://' + __dirname + '/index.html');
36 //mainWindow.openDevTools();
38 // Emitted when the window is closed.
39 mainWindow.on('closed', function() {
40 // Dereference the window object, usually you would store windows
41 // in an array if your app supports multi windows, this is the time
42 // when you should delete the corresponding element.