Skip to content

Commit c62caff

Browse files
jayeshsingh9767onejayeshjtpio
authored
Updated fav-icon Base URL from JupyterLab PageConfig. (#7109)
* Updated fav-icon Base URL from JupyterLab PageConfig. * Reformatted code for reability. * Used for conncatinating fac-icon URL * Lint --------- Co-authored-by: [email protected] <[email protected]> Co-authored-by: Jeremy Tuloup <[email protected]>
1 parent 03a27f0 commit c62caff

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

packages/notebook-extension/src/index.ts

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import {
1414

1515
import { Cell, CodeCell } from '@jupyterlab/cells';
1616

17-
import { Text, Time } from '@jupyterlab/coreutils';
17+
import { PageConfig, Text, Time, URLExt } from '@jupyterlab/coreutils';
1818

1919
import { IDocumentManager } from '@jupyterlab/docmanager';
2020

@@ -411,8 +411,12 @@ const tabIcon: JupyterFrontEndPlugin<void> = {
411411
requires: [INotebookTracker],
412412
activate: (app: JupyterFrontEnd, tracker: INotebookTracker) => {
413413
// the favicons are provided by Jupyter Server
414-
const notebookIcon = ' /static/favicons/favicon-notebook.ico';
415-
const busyIcon = ' /static/favicons/favicon-busy-1.ico';
414+
const baseURL = PageConfig.getBaseUrl();
415+
const notebookIcon = URLExt.join(
416+
baseURL,
417+
'static/favicons/favicon-notebook.ico'
418+
);
419+
const busyIcon = URLExt.join(baseURL, 'static/favicons/favicon-busy-1.ico');
416420

417421
const updateBrowserFavicon = (
418422
status: ISessionContext.KernelDisplayStatus

0 commit comments

Comments
 (0)