Skip to content

An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作

:art: The browser redirects to a blank page when exiting the application https://github.com/siyuan-note/siyuan/issues/16945

Danielb7d999744a47
diff --git a/app/src/index.ts b/app/src/index.ts
index 3c6a1a9271..a5717a2e37 100644
--- a/app/src/index.ts
+++ b/app/src/index.ts
@@ -26,7 +26,7 @@ import {
import {initMessage, showMessage} from "./dialog/message";
import {getAllTabs} from "./layout/getAll";
import {getLocalStorage, isChromeBrowser, isInMobileApp} from "./protyle/util/compatibility";
-import {getSearch} from "./util/functions";
+import {getSearch, isBrowser} from "./util/functions";
import {checkPublishServiceClosed} from "./util/processMessage";
import {hideAllElements} from "./protyle/ui/hideElements";
import {loadPlugins, reloadPlugin} from "./plugin/loader";
@@ -188,6 +188,10 @@ export class App {
case "openFileById":
openFileById({app: this, id: data.data.id, action: [Constants.CB_GET_FOCUS]});
break;
+ case "exit":
+ if (isBrowser()) {
+ window.location.href = "about:blank";
+ }
}
}
}