aboutsummaryrefslogtreecommitdiff
path: root/crash/wrapper.js
diff options
context:
space:
mode:
Diffstat (limited to 'crash/wrapper.js')
-rw-r--r--crash/wrapper.js78
1 files changed, 38 insertions, 40 deletions
diff --git a/crash/wrapper.js b/crash/wrapper.js
index ba5a8b9..4c291bd 100644
--- a/crash/wrapper.js
+++ b/crash/wrapper.js
@@ -1,41 +1,39 @@
-const { app, BrowserWindow } = require('electron')
-
-if (require('fs').existsSync(require('os').userInfo().homedir + "/.kartik/config/lang.txt")) {
- lp = require('fs').readFileSync(require('os').userInfo().homedir + "/.kartik/config/lang.txt").toString();
-}
-
-function createWindow () {
- const win = new BrowserWindow({
- width: 800,
- height: 375,
- resizeable: false,
- resizable: false,
- maximizable: false,
- bgColor: "#ffffff",
- title: "Kartik",
- webPreferences: {
- nodeIntegration: true,
- contextIsolation: false,
- enableRemoteModule: true,
- webviewTag: true
- }
- })
-
- win.lp = lp;
- win.loadFile('crash.html')
- win.setMenu(null);
-}
-
-app.whenReady().then(createWindow)
-
-app.on('window-all-closed', () => {
- if (process.platform !== 'darwin') {
- app.quit()
- }
-})
-
-app.on('activate', () => {
- if (BrowserWindow.getAllWindows().length === 0) {
- createWindow()
- }
+const { app, BrowserWindow } = require('electron')
+
+lp = "en";
+
+function createWindow () {
+ const win = new BrowserWindow({
+ width: 800,
+ height: 375,
+ resizeable: false,
+ resizable: false,
+ maximizable: false,
+ bgColor: "#ffffff",
+ title: "Kartik",
+ webPreferences: {
+ nodeIntegration: true,
+ contextIsolation: false,
+ enableRemoteModule: true,
+ webviewTag: true
+ }
+ })
+
+ win.lp = lp;
+ win.loadFile('crash.html')
+ win.setMenu(null);
+}
+
+app.whenReady().then(createWindow)
+
+app.on('window-all-closed', () => {
+ if (process.platform !== 'darwin') {
+ app.quit()
+ }
+})
+
+app.on('activate', () => {
+ if (BrowserWindow.getAllWindows().length === 0) {
+ createWindow()
+ }
}) \ No newline at end of file