const { app, BrowserWindow, globalShortcut } = require("electron");1//const yeeter = require('./yeeter.js');2// Keep a global reference of the window object, if you don't, the window will3// be closed automatically when the JavaScript object is garbage collected.4let win;56function createWindow() {7// Create the browser window.8win = new BrowserWindow({9width: 800,10height: 625,11frame: false,12webPreferences: {13nodeIntegration: true14}15});1617// and load the index.html of the app.18win.loadFile("index.html");1920// Open the DevTools.21//win.webContents.openDevTools()2223// Emitted when the window is closed.24win.on("close", () => {25// Dereference the window object, usually you would store windows26// in an array if your app supports multi windows, this is the time27// when you should delete the corresponding element.28// Unregiste all shortcuts when app is closed29globalShortcut.unregisterAll();30win = null;31});32}3334// This method will be called when Electron has finished35// initialization and is ready to create browser windows.36// Some APIs can only be used after this event occurs.37app.on("ready", () => {38// Create shortcuts for stealth mode on app ready39const hideWindowShortcut = globalShortcut.register(40"CommandOrControl+Shift+P",41() => {42win.hide();43}44);45const showWindowShortcut = globalShortcut.register(46"CommandOrControl+P",47() => {48win.show();49}50);51createWindow();52});5354// Quit when all windows are closed.55app.on("window-all-closed", () => {56// On macOS it is common for applications and their menu bar57// to stay active until the user quits explicitly with Cmd + Q58if (process.platform !== "darwin") {59app.quit();60}61});6263app.on("activate", () => {64// On macOS it's common to re-create a window in the app when the65// dock icon is clicked and there are no other windows open.66if (win === null) {67createWindow();68}69});7071// In this file you can include the rest of your app's specific main process72// code. You can also put them in separate files and require them here.737475