Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
tray = null;
});
win.on('closed', () => {
win = null;
app.quit();
});
};
const launchOnSystemStartup = (app, launch) => {
app.setLoginItemSettings({
openAtLogin: launch
});
};
const loadURL = serve({ directory: 'build' });
app.on('ready', () => {
app.dock.hide();
Menu.setApplicationMenu(Menu.buildFromTemplate([]));
win = new MainWindow();
if (process.env.NODE_ENV === 'development') {
win.loadURL('http://localhost:3000');
} else {
loadURL(win);
}
bot = new ClipBot(app, win);
tray = new ClipTray(trayIcon, win, bot);
bot.watchClipboard(clip => {