diff options
author | Minteck <contact@minteck.org> | 2022-05-18 18:50:12 +0200 |
---|---|---|
committer | Minteck <contact@minteck.org> | 2022-05-18 18:50:12 +0200 |
commit | 0bd45cb2cae3af05adaad3f38d129bb67c3e0ec0 (patch) | |
tree | 97a7e15187fe7fcb5b8775e03a62f62ac8fc5c61 /kartik/crash/wrapper.js | |
parent | d4805039b8ea7b30f5e78cf53caf8fd3f267256a (diff) | |
download | arcade-0bd45cb2cae3af05adaad3f38d129bb67c3e0ec0.tar.gz arcade-0bd45cb2cae3af05adaad3f38d129bb67c3e0ec0.tar.bz2 arcade-0bd45cb2cae3af05adaad3f38d129bb67c3e0ec0.zip |
Diffstat (limited to 'kartik/crash/wrapper.js')
-rwxr-xr-x | kartik/crash/wrapper.js | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/kartik/crash/wrapper.js b/kartik/crash/wrapper.js new file mode 100755 index 0000000..16ecfd9 --- /dev/null +++ b/kartik/crash/wrapper.js @@ -0,0 +1,39 @@ +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 |