@jupyterlab/application-extension
Advanced tools
Comparing version 0.17.1 to 0.17.2
@@ -229,5 +229,18 @@ "use strict"; | ||
app.busySignal.connect((_, isBusy) => { | ||
const filename = isBusy ? 'favicon-busy-1.ico' : 'favicon.ico'; | ||
const favicon = document.querySelector('link[rel="shortcut icon"]'); | ||
favicon.href = `/static/base/images/${filename}`; | ||
const favicon = document.querySelector(`link[rel="icon"]${isBusy ? '.idle.favicon' : '.busy.favicon'}`); | ||
if (!favicon) { | ||
return; | ||
} | ||
const newFavicon = document.querySelector(`link${isBusy ? '.busy.favicon' : '.idle.favicon'}`); | ||
if (!newFavicon) { | ||
return; | ||
} | ||
// If we have the two icons with the special classes, then toggle them. | ||
if (favicon !== newFavicon) { | ||
favicon.rel = ''; | ||
newFavicon.rel = 'icon'; | ||
// Firefox doesn't seem to recognize just changing rel, so we also | ||
// reinsert the link into the DOM. | ||
newFavicon.parentNode.replaceChild(newFavicon, newFavicon); | ||
} | ||
}); | ||
@@ -234,0 +247,0 @@ }), |
{ | ||
"name": "@jupyterlab/application-extension", | ||
"version": "0.17.1", | ||
"version": "0.17.2", | ||
"description": "JupyterLab - Application Extension", | ||
@@ -5,0 +5,0 @@ "homepage": "https://github.com/jupyterlab/jupyterlab", |
Sorry, the diff of this file is not supported yet
37984
370