From: Jakub Vrana Date: Mon, 16 May 2011 14:43:02 +0000 (+0200) Subject: Save bytes X-Git-Tag: v3.3.0~71 X-Git-Url: https://git.joonet.de/?a=commitdiff_plain;h=c1c598db1ee22152b4ee709283df6dc701cd139d;p=adminer.git Save bytes --- 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) {