-
Notifications
You must be signed in to change notification settings - Fork 1
/
main.js
47 lines (33 loc) · 903 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
42
43
44
'use strict';
const electron = require('electron');
const {app, protocol} = electron;
const {BrowserWindow} = electron;
const {globalShortcut} = electron;
const {ipcRenderer} = electron;
const {webContents} = electron;
var mainWindow = null;
app.commandLine.appendSwitch('--disable-http-cache');
//app.disableHardwareAcceleration()
app.on('ready', function(event) {
event.preventDefault();
setTimeout(() => {
mainWindow = new BrowserWindow({
frame: false,
height: 500,
//resizable: false,
width: 500,
transparent:true,
backgroundColor: '#00000000',
webPreferences: {
nodeIntegration: true,
contextIsolation: false,
enableRemoteModule: true,
}
});
mainWindow.loadURL('file://' + __dirname + '/index.html');
mainWindow.maximize()
},500)
});
app.on('window-all-closed', () => {
app.quit();
});