-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.js
41 lines (34 loc) · 876 Bytes
/
main.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
39
40
41
console.log("Main process working");
const electron = require("electron");
const app = electron.app;
const BrowserWindow = electron.BrowserWindow;
const path = require("path");
const url = require("url");
function createWindow() {
let win;
win = new BrowserWindow({
height: 150,
width: 500,
maxHeight: 150,
maxWidth: 500,
minHeight: 150,
minWidth: 500,
fullscreenable: false,
frame: false,
show: false,
focusable: false,
webPreferences: {
nodeIntegration: true,
contextIsolation: false
}
});
win.loadFile(path.join(__dirname, 'index.html'));
//win.webContents.openDevTools();
win.once('ready-to-show', () => {
win.show();
})
win.on('closed', () => {
win = null;
})
}
app.on('ready', createWindow);