Skip to content

Instantly share code, notes, and snippets.

@leoramos086
Last active July 8, 2020 19:30
Show Gist options
  • Select an option

  • Save leoramos086/57daac16b1e1e2ce5f1d23cc0f7430fe to your computer and use it in GitHub Desktop.

Select an option

Save leoramos086/57daac16b1e1e2ce5f1d23cc0f7430fe to your computer and use it in GitHub Desktop.
Códigos para Electron
var shouldQuit = app.makeSingleInstance(function(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;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment