summaryrefslogtreecommitdiff
path: root/index.js
diff options
context:
space:
mode:
authorMinteck <contact@minteck.org>2023-02-13 20:09:08 +0100
committerMinteck <contact@minteck.org>2023-02-13 20:09:08 +0100
commitd99ce89ce4fb99292bd68b2df38af56d83e942d1 (patch)
tree9edba2882259d5e5819602b381c70054294c0faa /index.js
parent82dd01f2a4f05853b5a71cc9d3d58ce341d09b01 (diff)
downloaddelta-kiosk-d99ce89ce4fb99292bd68b2df38af56d83e942d1.tar.gz
delta-kiosk-d99ce89ce4fb99292bd68b2df38af56d83e942d1.tar.bz2
delta-kiosk-d99ce89ce4fb99292bd68b2df38af56d83e942d1.zip
Updated 3 files and added 34 files (automated)
Diffstat (limited to 'index.js')
-rw-r--r--index.js34
1 files changed, 34 insertions, 0 deletions
diff --git a/index.js b/index.js
new file mode 100644
index 0000000..c9b9f43
--- /dev/null
+++ b/index.js
@@ -0,0 +1,34 @@
+const { app, BrowserWindow } = require('electron');
+require('@electron/remote/main').initialize();
+
+const createWindow = () => {
+ const mainWindow = new BrowserWindow({
+ width: 800,
+ height: 600,
+ fullscreen: true,
+ title: "Delta Kiosk",
+ webPreferences: {
+ nodeIntegration: true,
+ contextIsolation: false,
+ webviewTag: true,
+ enableRemoteModule: true
+ }
+ })
+
+ require('@electron/remote/main').enable(mainWindow.webContents);
+
+ mainWindow.loadFile('index.html');
+ mainWindow.setMenu(null);
+}
+
+app.whenReady().then(() => {
+ createWindow()
+
+ app.on('activate', () => {
+ if (BrowserWindow.getAllWindows().length === 0) createWindow()
+ })
+})
+
+app.on('window-all-closed', () => {
+ if (process.platform !== 'darwin') app.quit();
+}) \ No newline at end of file