1
0
mirror of https://github.com/vrana/adminer.git synced 2025-08-12 09:34:10 +02:00

AJAX: fix active link

This commit is contained in:
Jakub Vrana
2010-12-02 22:20:01 +01:00
parent 08d51f2ecf
commit 53409fcbe8

View File

@@ -250,8 +250,9 @@ function ajaxSend(url, data) {
}
var as = document.getElementById('menu').getElementsByTagName('a');
var href = location.href.replace(/(&(sql=|dump=|(select|table)=[^&]*)).*/, '$1');
for (var i=0; i < as.length; i++) {
if (location.href == as[i].href) {
if (href == as[i].href) {
as[i].className = 'active';
} else if (as[i].className == 'active') {
as[i].className = '';