( mb: Menubar, url: string, protocol: string, )
| 44 | * @param protocol - The custom protocol string to match. |
| 45 | */ |
| 46 | export function handleProtocolURL( |
| 47 | mb: Menubar, |
| 48 | url: string, |
| 49 | protocol: string, |
| 50 | ): void { |
| 51 | if (url.startsWith(`${protocol}://`)) { |
| 52 | logInfo('main:handleUrl', `forwarding URL ${url} to renderer process`); |
| 53 | sendRendererEvent(mb, EVENTS.AUTH_CALLBACK, url); |
| 54 | } |
| 55 | } |
| 56 | |
| 57 | /** |
| 58 | * Enforce a single application instance. If a second instance is launched, |
no test coverage detected