aboutsummaryrefslogtreecommitdiff
path: root/src/index.js
blob: 50f2b6e26c5f816711031c9963a1b641ab6e6160 (plain)
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
const path = require("path");
const { app, BrowserWindow } = require("electron");

function start() {
	win = new BrowserWindow({
		width: 500,
		height: 115,
		show: false,
		title: "Viper",
		webPreferences: {
			nodeIntegration: true,
			contextIsolation: false,
		},
	}); win.openDevTools()

	win.removeMenu();
	win.loadFile(__dirname + "/app/index.html");
	win.webContents.once("dom-ready", () => {win.show()});
}

app.on("ready", () => {
	app.setPath("userData", path.join(app.getPath("cache"), app.name));
	start();
})