mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
21 lines
454 B
JavaScript
21 lines
454 B
JavaScript
const { app, BrowserWindow } = require('electron')
|
|
|
|
let onlineStatusWindow
|
|
|
|
app.whenReady().then(() => {
|
|
onlineStatusWindow = new BrowserWindow({ width: 0, height: 0, show: false })
|
|
onlineStatusWindow.loadURL(`file://${__dirname}/index.html`)
|
|
})
|
|
|
|
app.on('window-all-closed', () => {
|
|
if (process.platform !== 'darwin') {
|
|
app.quit()
|
|
}
|
|
})
|
|
|
|
app.on('activate', () => {
|
|
if (BrowserWindow.getAllWindows().length === 0) {
|
|
createWindow()
|
|
}
|
|
})
|