From 8d83053d9c43f12249367386e37df492f6d51e0c Mon Sep 17 00:00:00 2001 From: team3 Date: Sat, 23 May 2026 15:14:38 +0200 Subject: [PATCH] update --- main.ts | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/main.ts b/main.ts index 8bcc29b..0cb360d 100644 --- a/main.ts +++ b/main.ts @@ -24,6 +24,21 @@ export default class ContexterPlugin extends Plugin { callback: () => void this.activateProjectView(), }); + this.registerObsidianProtocolHandler("contexter", async (params) => { + const project = params.project; + if (!project) { + await this.activateProjectView(); + return; + } + const leaf = this.app.workspace.getLeaf(false); + await leaf.setViewState({ + type: VIEW_TYPE_PROJECT_DETAILS_VIEW, + active: true, + state: { project }, + }); + this.app.workspace.revealLeaf(leaf); + }); + if (Platform.isMobile) { const reattach = () => this.reattachMobileBreadcrumbs(); this.registerEvent(