aboutsummaryrefslogtreecommitdiff
path: root/src/index.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/index.js')
-rw-r--r--src/index.js25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/index.js b/src/index.js
new file mode 100644
index 0000000..50f2b6e
--- /dev/null
+++ b/src/index.js
@@ -0,0 +1,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();
+})
+