Browse Source

Fixes #87

pull/116/merge
Ramiro Saenz 9 years ago
parent
commit
f8b835a66a
  1. 13
      electron/main.js

13
electron/main.js

@ -175,6 +175,19 @@ function updateBadge(title) {
// Allow Custom sites with self certificates
app.commandLine.appendSwitch('ignore-certificate-errors');
const shouldQuit = app.makeSingleInstance((commandLine, workingDirectory) => {
// Someone tried to run a second instance, we should focus our window.
if (mainWindow) {
if (mainWindow.isMinimized()) mainWindow.restore();
mainWindow.focus();
}
});
if (shouldQuit) {
app.quit();
return;
}
// This method will be called when Electron has finished
// initialization and is ready to create browser windows.
app.on('ready', createWindow);

Loading…
Cancel
Save