From c1c598db1ee22152b4ee709283df6dc701cd139d Mon Sep 17 00:00:00 2001 From: Jakub Vrana Date: Mon, 16 May 2011 16:43:02 +0200 Subject: [PATCH] Save bytes --- adminer/static/functions.js | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/adminer/static/functions.js b/adminer/static/functions.js index 13de08d5..f27c3630 100644 --- a/adminer/static/functions.js +++ b/adminer/static/functions.js @@ -314,11 +314,7 @@ function ajaxSend(url, data, popState) { 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 (href == as[i].href) { - as[i].className = 'active'; - } else if (as[i].className == 'active') { - as[i].className = ''; - } + as[i].className = (href == as[i].href ? 'active' : ''); } var dump = document.getElementById('dump'); if (dump) {