From a1082c6757879cda94153ca6e0d62183b77c765f Mon Sep 17 00:00:00 2001 From: Swasti Kakker <142968737+skbitsp@users.noreply.github.com> Date: Tue, 28 May 2024 17:56:16 +0530 Subject: [PATCH] Open shared link (#49) * Open shared link * Removing console.logs --------- Co-authored-by: skakker --- src/index.ts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/index.ts b/src/index.ts index cfafc19..00e36a4 100644 --- a/src/index.ts +++ b/src/index.ts @@ -69,6 +69,15 @@ const fileBrowserFactory: JupyterFrontEndPlugin = { widget.listing.singleClickToUnfold = setting.get('singleClickToUnfold') .composite as boolean; }); + + // check the url in iframe and open + app.restored.then(() => { + const windowPathname = window.location.pathname; + let treeIndex = windowPathname.indexOf('/tree/'); + let path = windowPathname.substring(treeIndex + '/tree/'.length); + path = decodeURIComponent(path); + docManager.open(path); + }); // Track the newly created file browser. void tracker.add(widget);