mirror of
https://github.com/vrana/adminer.git
synced 2025-08-17 20:01:25 +02:00
Customizable favicon
This commit is contained in:
@@ -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 {
|
||||
|
Reference in New Issue
Block a user