diff --git a/main.js b/main.js index 1affefa..27e79b1 100644 --- a/main.js +++ b/main.js @@ -40,20 +40,23 @@ app.on('ready', () => { }); function createMainWindow() { - const userDataPath = path.join(app.getPath('userData'), 'Cache'); - mainWindow = new BrowserWindow({ width: 800, height: 600, webPreferences: { preload: path.join(__dirname, 'preload.js'), - nodeIntegration: false, contextIsolation: true, + nodeIntegration: false, }, }); - app.setPath('userData', userDataPath); mainWindow.loadFile('index.html'); + + // Hide the window instead of quitting + mainWindow.on('close', (event) => { + event.preventDefault(); + mainWindow.hide(); + }); } async function sendAPIRequest(data = {}) {