Skip to content

Commit

Permalink
Updated fav-icon Base URL from JupyterLab PageConfig. (#7109)
Browse files Browse the repository at this point in the history
* 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]>
  • Loading branch information
3 people authored Oct 17, 2023
1 parent 03a27f0 commit c62caff
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions packages/notebook-extension/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import {

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

import { Text, Time } from '@jupyterlab/coreutils';
import { PageConfig, Text, Time, URLExt } from '@jupyterlab/coreutils';

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

Expand Down Expand Up @@ -411,8 +411,12 @@ const tabIcon: JupyterFrontEndPlugin<void> = {
requires: [INotebookTracker],
activate: (app: JupyterFrontEnd, tracker: INotebookTracker) => {
// the favicons are provided by Jupyter Server
const notebookIcon = ' /static/favicons/favicon-notebook.ico';
const busyIcon = ' /static/favicons/favicon-busy-1.ico';
const baseURL = PageConfig.getBaseUrl();
const notebookIcon = URLExt.join(
baseURL,
'static/favicons/favicon-notebook.ico'
);
const busyIcon = URLExt.join(baseURL, 'static/favicons/favicon-busy-1.ico');

const updateBrowserFavicon = (
status: ISessionContext.KernelDisplayStatus
Expand Down

0 comments on commit c62caff

Please sign in to comment.