From 53409fcbe8d6954a8af0e52a790f663775f7ef5c Mon Sep 17 00:00:00 2001 From: Jakub Vrana Date: Thu, 2 Dec 2010 22:20:01 +0100 Subject: [PATCH] AJAX: fix active link --- adminer/static/functions.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/adminer/static/functions.js b/adminer/static/functions.js index ee717fa8..7bcc235c 100644 --- a/adminer/static/functions.js +++ b/adminer/static/functions.js @@ -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 = '';