<meta http-equiv="Content-Script-Type" content="text/javascript">
<meta name="robots" content="noindex">
<title><?php echo $title_page; ?></title>
-<link rel="shortcut icon" type="image/x-icon" href="../adminer/static/favicon.ico">
+<link rel="shortcut icon" type="image/x-icon" href="../adminer/static/favicon.ico" id="favicon">
<link rel="stylesheet" type="text/css" href="../adminer/static/default.css">
<?php if (file_exists("adminer.css")) { ?>
<link rel="stylesheet" type="text/css" href="adminer.css">
});
}
+/** Replace favicon
+* @param string
+* @return string original href
+*/
+function replaceFavicon(href) {
+ var favicon = document.getElementById('favicon');
+ var orig = favicon.href;
+ favicon.href = href;
+ favicon.parentNode.appendChild(favicon); // to replace the icon in Firefox
+ return orig;
+}
+
var ajaxState = 0;
/** Safely load content to #content
*/
function ajaxSend(url, data, popState) {
var currentState = ++ajaxState;
+ var favicon = replaceFavicon('../adminer/static/loader.gif');
setHtml('loader', '<img src="../adminer/static/loader.gif" alt="">');
return ajax(url, function (text) {
if (currentState == ajaxState) {
+ replaceFavicon(favicon);
if (text === undefined) {
setHtml('loader', '');
} else {