diff --git a/main.js b/main.js index b83faee..98544c4 100644 --- a/main.js +++ b/main.js @@ -1,4 +1,4 @@ -const { app, BrowserWindow } = require('electron/main'); +const { app, BrowserWindow, nativeTheme, Menu } = require('electron/main'); const path = require('node:path'); const fs = require('fs'); const os = require('os'); @@ -72,15 +72,17 @@ async function createWindow() { height: 1080, backgroundColor: '#000000', icon: 'images/icon-512.png', + autoHideMenuBar: true, webPreferences: { preload: path.join(__dirname, 'preload.js'), - nodeIntegration: true, webSecurity: false, + disableDialogs: true }, - show: false, - autoHideMenuBar: true }); + nativeTheme.themeSource = 'dark'; + Menu.setApplicationMenu(null); + // register event callbacks win.on("closed", function () { win = null; }); win.webContents.on("will-frame-navigate", (event) => validateDomain(event));