1
0
mirror of https://github.com/vrana/adminer.git synced 2025-08-17 20:01:25 +02:00

Customizable favicon

This commit is contained in:
Jakub Vrana
2011-04-03 08:17:26 -07:00
parent 8e46171f14
commit d55ba18b43
3 changed files with 12 additions and 6 deletions

View File

@@ -280,13 +280,17 @@ function ajaxSetHtml(url) {
});
}
var originalFavicon = (document.getElementById('favicon') || {}).href;
/** Replace favicon
* @param string
*/
function replaceFavicon(href) {
var favicon = document.getElementById('favicon');
favicon.href = href;
favicon.parentNode.appendChild(favicon); // to replace the icon in Firefox
if (favicon) {
favicon.href = href;
favicon.parentNode.appendChild(favicon); // to replace the icon in Firefox
}
}
var ajaxState = 0;
@@ -317,7 +321,7 @@ function ajaxSend(url, data, popState) {
return ajaxSend(redirect, '', popState);
}
onblur = function () { };
replaceFavicon('../adminer/static/favicon.ico');
replaceFavicon(originalFavicon);
if (!xmlhttp.status) {
setHtml('loader', '');
} else {