diff --git a/docs/tutorial/launch-app-from-url-in-another-app.md b/docs/tutorial/launch-app-from-url-in-another-app.md index 4fe2212d040..d3868583481 100644 --- a/docs/tutorial/launch-app-from-url-in-another-app.md +++ b/docs/tutorial/launch-app-from-url-in-another-app.md @@ -63,9 +63,9 @@ const createWindow = () => { In this next step, we will create our `BrowserWindow` and tell our application how to handle an event in which an external protocol is clicked. -This code will be different in Windows compared to MacOS and Linux. This is due to Windows requiring additional code in order to open the contents of the protocol link within the same Electron instance. Read more about this [here](../api/app.md#apprequestsingleinstancelockadditionaldata). +This code will be different in Windows and Linux compared to MacOS. This is due to both platforms emitting the `second-instance` event rather than the `open-url` event and Windows requiring additional code in order to open the contents of the protocol link within the same Electron instance. Read more about this [here](../api/app.md#apprequestsingleinstancelockadditionaldata). -#### Windows code: +#### Windows and Linux code: ```javascript @ts-type={mainWindow:Electron.BrowserWindow} @ts-type={createWindow:()=>void} const gotTheLock = app.requestSingleInstanceLock() @@ -80,8 +80,7 @@ if (!gotTheLock) { mainWindow.focus() } // the commandLine is array of strings in which last element is deep link url - // the url str ends with / - dialog.showErrorBox('Welcome Back', `You arrived from: ${commandLine.pop().slice(0, -1)}`) + dialog.showErrorBox('Welcome Back', `You arrived from: ${commandLine.pop()}`) }) // Create mainWindow, load the rest of the app, etc... @@ -91,7 +90,7 @@ if (!gotTheLock) { } ``` -#### MacOS and Linux code: +#### MacOS code: ```javascript @ts-type={createWindow:()=>void} // This method will be called when Electron has finished