Skip to content

Commit

Permalink
Open shared link (#49)
Browse files Browse the repository at this point in the history
* Open shared link

* Removing console.logs

---------

Co-authored-by: skakker <skakker@linkedin.com>
  • Loading branch information
skbitsp and skakker authored May 28, 2024
1 parent 3678858 commit a1082c6
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,15 @@ const fileBrowserFactory: JupyterFrontEndPlugin<IFileBrowserFactory> = {
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);
Expand Down

0 comments on commit a1082c6

Please sign in to comment.