fix custom protocol when app is already open
This commit is contained in:
+5
-2
@@ -419,8 +419,11 @@ if (app.requestSingleInstanceLock()) {
|
|||||||
|
|
||||||
function parseOpenUrl(argv: string[]) {
|
function parseOpenUrl(argv: string[]) {
|
||||||
//fs.writeFileSync(path.join(app.getPath('appData'), 'SideQuest', 'test_output_loaded.txt'), JSON.stringify(argv));
|
//fs.writeFileSync(path.join(app.getPath('appData'), 'SideQuest', 'test_output_loaded.txt'), JSON.stringify(argv));
|
||||||
if (argv[1] && argv[1].length && argv[1].substr(0, 12) === 'sidequest://') {
|
for (let arg of argv) {
|
||||||
setTimeout(() => mainWindow.webContents.send('open-url', argv[1].toString()), 5000);
|
if (arg && arg.length && arg.substr(0, 12) === 'sidequest://') {
|
||||||
|
console.log('opening url ' + arg.toString());
|
||||||
|
setTimeout(() => mainWindow.webContents.send('open-url', arg.toString()), 5000);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
function addWindowDownloadHandler(window) {
|
function addWindowDownloadHandler(window) {
|
||||||
|
|||||||
Reference in New Issue
Block a user