Skip to content

Commit 46d5b68

Browse files
committed
Use default router from lab
1 parent 64af07d commit 46d5b68

File tree

2 files changed

+2
-29
lines changed

2 files changed

+2
-29
lines changed

packages/application-extension/src/index.ts

Lines changed: 1 addition & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@ import {
66
IRouter,
77
ITreePathUpdater,
88
JupyterFrontEnd,
9-
JupyterFrontEndPlugin,
10-
Router
9+
JupyterFrontEndPlugin
1110
} from '@jupyterlab/application';
1211

1312
import {
@@ -295,31 +294,6 @@ const paths: JupyterFrontEndPlugin<JupyterFrontEnd.IPaths> = {
295294
}
296295
};
297296

298-
/**
299-
* The default URL router provider.
300-
*/
301-
const router: JupyterFrontEndPlugin<IRouter> = {
302-
id: '@jupyter-notebook/application-extension:router',
303-
autoStart: true,
304-
provides: IRouter,
305-
requires: [JupyterFrontEnd.IPaths],
306-
activate: (app: JupyterFrontEnd, paths: JupyterFrontEnd.IPaths) => {
307-
const { commands } = app;
308-
const base = paths.urls.base;
309-
const router = new Router({ base, commands });
310-
void app.started.then(() => {
311-
// Route the very first request on load.
312-
void router.route();
313-
314-
// Route all pop state events.
315-
window.addEventListener('popstate', () => {
316-
void router.route();
317-
});
318-
});
319-
return router;
320-
}
321-
};
322-
323297
/**
324298
* The default session dialogs plugin
325299
*/
@@ -932,7 +906,6 @@ const plugins: JupyterFrontEndPlugin<any>[] = [
932906
opener,
933907
pages,
934908
paths,
935-
router,
936909
sessionDialogs,
937910
shell,
938911
sidebarVisibility,

packages/docmanager-extension/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import { IDocumentWidget, DocumentRegistry } from '@jupyterlab/docregistry';
1515
import { Signal } from '@lumino/signaling';
1616

1717
/**
18-
* A plugin to open document in a new browser tab.
18+
* A plugin to open documents in a new browser tab.
1919
*
2020
*/
2121
const opener: JupyterFrontEndPlugin<IDocumentWidgetOpener> = {

0 commit comments

Comments
 (0)