]> git.joonet.de Git - adminer.git/commitdiff
Save bytes
authorJakub Vrana <jakub@vrana.cz>
Mon, 16 May 2011 14:43:02 +0000 (16:43 +0200)
committerJakub Vrana <jakub@vrana.cz>
Mon, 16 May 2011 14:43:02 +0000 (16:43 +0200)
adminer/static/functions.js

index 13de08d57a9fde7270ee1e0a12776c346ce390f3..f27c363076f59f7d65ae10f474849c16a0352bce 100644 (file)
@@ -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) {