-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.js
More file actions
31 lines (25 loc) · 662 Bytes
/
main.js
File metadata and controls
31 lines (25 loc) · 662 Bytes
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
const {app, BrowserWindow, screen} = require('electron');
let mainWindow;
app.allowRendererProcessReuse = true;
app.on('ready', function() {
const { width, height } = screen.getPrimaryDisplay().workAreaSize
mainWindow = new BrowserWindow({
width: width*0.6,
height: height*0.6,
transparent: false,
frame: false,
useContentSize: true,
alwaysOnTop: false,
vibrancy: 'hud',
webPreferences: {
nodeIntegration: true,
devTools: true,
webviewTag: true
}
});
mainWindow.loadURL('file://' + __dirname + '/browser.html');
// mainWindow.openDevTools();
})
app.on('window-all-closed', function() {
app.quit();
});