-
Notifications
You must be signed in to change notification settings - Fork 5
/
index.js
42 lines (34 loc) · 821 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
39
40
41
42
const { app, BrowserWindow } = require('electron')
app.setAppUserModelId("X Comic Downloader")
function createWindow () {
const win = new BrowserWindow({
icon: __dirname+'/Image/favicon.ico',
minWidth: 800,
minHeight: 600,
frame: false,
center: true,
title: 'X Comic Downloader v2.3.3',
webPreferences: {
enableRemoteModule: true,
nodeIntegration: true,
contextIsolation: false
}
})
win.maximize(true)
win.setMenu(null)
win.addListener('close', e => {
e.preventDefault()
})
win.loadFile(require('path').join(__dirname, 'index.html'))
}
app.whenReady().then(() => {
createWindow()
app.on('activate', function () {
if (BrowserWindow.getAllWindows().length === 0) createWindow()
})
})
app.on('window-all-closed', () => {
if (process.platform !== 'darwin') {
app.quit()
}
})