git ssb

0+

alanz / patchwork



forked from Matt McKegg / patchwork

Tree: dbcaed4a38e2a45014c7a8a7e73a0b5e53164c31

Files: dbcaed4a38e2a45014c7a8a7e73a0b5e53164c31 / lib / make-single-instance.js

356 bytesRaw
1var electron = require('electron')
2module.exports = function (windows, openMainWindow) {
3 if (electron.app.makeSingleInstance((commandLine, workingDirectory) => {
4 if (windows.main) {
5 if (windows.main.isMinimized()) windows.main.restore()
6 windows.main.focus()
7 } else {
8 openMainWindow()
9 }
10 })) {
11 electron.app.quit()
12 }
13}
14

Built with git-ssb-web