This repository has been archived on 2025-01-09. You can view files and clone it, but cannot push or open issues or pull requests.

26 lines
554 B
JavaScript
Raw Permalink Normal View History

2025-01-09 18:30:49 +08:00
const { app, BrowserWindow } = require('electron')
const createWindow = () => {
let mainWin = new BrowserWindow({
show: false,
width: 800,
height: 400,
webPreferences: {
nodeIntegration: true,
enableRemoteModule: true
}
})
mainWin.loadFile('index.html')
mainWin.on('ready-to-show', () => {
mainWin.show()
})
mainWin.on('close', () => {
mainWin = null
})
}
app.on('ready', createWindow)
app.on('window-all-closed', () => {
app.quit()
})