aboutsummaryrefslogtreecommitdiff
path: root/src/modules
diff options
context:
space:
mode:
author0neGal <mail@0negal.com>2024-06-08 18:02:48 +0200
committer0neGal <mail@0negal.com>2024-06-08 18:02:48 +0200
commitdbd8c6b152acc1188d2edd288488aa2da8f6310b (patch)
treeef5a1752e845a274c889ee18207c3a25e8290b23 /src/modules
parent3904a4492f72ef9a9fd531c0b81f3711541c97e0 (diff)
downloadViper-dbd8c6b152acc1188d2edd288488aa2da8f6310b.tar.gz
Viper-dbd8c6b152acc1188d2edd288488aa2da8f6310b.zip
initial commit to better modularize frontend
Far from done, but this pretty much splits everything inside `src/app/main.js` into separate files.
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/kill.js10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/modules/kill.js b/src/modules/kill.js
index 5d03218..b0c4f97 100644
--- a/src/modules/kill.js
+++ b/src/modules/kill.js
@@ -1,12 +1,10 @@
const exec = require("child_process").exec;
const ipcMain = require("electron").ipcMain;
-ipcMain.on("kill-game", () => {
- kill.game();
-})
-
-ipcMain.on("kill-origin", () => {
- kill.origin();
+ipcMain.on("kill", (function_name) => {
+ if (typeof kill[function_name] == "function") {
+ kill[function_name]();
+ }
})
// a simple function to kill processes with a certain name