mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-17 23:20:13 +01:00
🎨 Support set Chromium command line arguments on the desktop https://github.com/siyuan-note/siyuan/issues/9696
This commit is contained in:
parent
1399757e76
commit
dfb837e5ce
1 changed files with 4 additions and 3 deletions
|
|
@ -605,13 +605,14 @@ if (!app.isPackaged) {
|
||||||
argStart = 2
|
argStart = 2
|
||||||
}
|
}
|
||||||
for (let i = argStart; i < process.argv.length; i++) {
|
for (let i = argStart; i < process.argv.length; i++) {
|
||||||
if (process.argv[i].startsWith("--workspace=") || process.argv[i].startsWith("--port=") || process.argv[i].startsWith("siyuan://")) {
|
let arg = process.argv[i];
|
||||||
|
if (arg.startsWith("--workspace=") || arg.startsWith("--port=") || arg.startsWith("siyuan://")) {
|
||||||
// 跳过内置参数
|
// 跳过内置参数
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
app.commandLine.appendSwitch(process.argv[i]);
|
app.commandLine.appendSwitch(arg);
|
||||||
writeLog("command line switch [" + process.argv[i] + "]");
|
writeLog("command line switch [" + arg + "]");
|
||||||
}
|
}
|
||||||
|
|
||||||
app.whenReady().then(() => {
|
app.whenReady().then(() => {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue