-
Notifications
You must be signed in to change notification settings - Fork 10
/
index.js
38 lines (35 loc) · 791 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 {
BrowserWindow,
app,
dialog,
ipcMain,
session,
net
} = require("electron")
const path = require("path")
let win = null
app.on("ready", () => {
console.log("loaded app")
//session.defaultSession.clearStorageData([], (data) => {})
win = new BrowserWindow({
width: 1280,
height: 720,
webPreferences: {
devTools: true,
preload: path.join(__dirname, "preload.js"),
nodeIntegration: true
},
minWidth: 1280,
minHeight: 720,
show: false,
icon: __dirname + "/build/icons/1024x1024.png"
})
win.loadURL(`https://web.whatsapp.com/`, {
userAgent:
"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:65.0) Gecko/20100101 Firefox/65.0"
})
win.maximize()
win.on("ready-to-show", function() {
win.show()
})
})