1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-07-16 00:14:34 +02:00

Add a function to check for valid callback url

This commit is contained in:
Roman
2021-08-14 20:20:16 +01:00
parent 047883bd27
commit f454c4e33b
2 changed files with 6 additions and 1 deletions

View File

@ -7,6 +7,7 @@ const Logger = require('@joplin/lib/Logger').default;
const FsDriverNode = require('@joplin/lib/fs-driver-node').default;
const envFromArgs = require('@joplin/lib/envFromArgs');
const packageInfo = require('./packageInfo.js');
const { isCallbackUrl } = require('@joplin/lib/ProtocolUtils');
// Electron takes the application name from package.json `name` and
// displays this in the tray icon toolip and message box titles, however in
@ -44,7 +45,7 @@ if (env === 'dev' && process.platform === 'win32') {
electronApp.setAsDefaultProtocolClient('joplin');
}
const initialUrl = process.argv.find((arg) => arg.startsWith('joplin://'));
const initialUrl = process.argv.find((arg) => isCallbackUrl(arg));
const wrapper = new ElectronAppWrapper(electronApp, env, profilePath, isDebugMode, initialUrl);