We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5ddf222 commit 64438e7Copy full SHA for 64438e7
src/electron/index.ts
@@ -75,11 +75,27 @@ function createMainWindow() {
75
if (!singleInstance) {
76
app.quit()
77
} else {
78
- app.on('second-instance', () => {
+ app.on('second-instance', (_event, argv) => {
79
if (mainWindow) {
80
if (!mainWindow.isVisible()) mainWindow.show()
81
mainWindow.focus()
82
}
83
+
84
+ if (!MAC) {
85
+ let urlWithBoostNoteProtocol
86
+ for (const arg of argv) {
87
+ if (/^boostnote:\/\//.test(arg)) {
88
+ urlWithBoostNoteProtocol = arg
89
+ break
90
+ }
91
92
+ if (urlWithBoostNoteProtocol != null && mainWindow != null) {
93
+ mainWindow.webContents.send(
94
+ 'open-boostnote-url',
95
+ urlWithBoostNoteProtocol
96
+ )
97
98
99
})
100
101
0 commit comments