-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.js
38 lines (30 loc) · 794 Bytes
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
const { app, BrowserWindow } = require('electron')
let win
function createWindow() {
// Create the browser window.
win = new BrowserWindow({
frame: false,
// transparent: true,
fullscreen: true,
thickFrame: false,
fullscreenable: true,
})
//win.setIgnoreMouseEvents(true)
win.loadURL(`file://${__dirname}/index.html`)
// Opens the DevTools.
// win.webContents.openDevTools()
win.on('closed', _ => {
win = null
})
win.on('resize', _ => {
win.setFullScreen(true)
})
}
// This method will be called when Electron has finished
// initialization and is ready to create browser windows.
// Some APIs can only be used after this event occurs.
app.on('ready', createWindow)
// Quit when all windows are closed.
app.on('window-all-closed', _ => {
app.quit()
})