From c15a943ec0e0423bed6716557dc41065d44e0716 Mon Sep 17 00:00:00 2001 From: gorhill Date: Mon, 2 Mar 2015 23:40:41 -0500 Subject: [PATCH] code review --- src/css/devtool-log.css | 4 ++-- src/js/devtool-log.js | 7 ++----- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/src/css/devtool-log.css b/src/css/devtool-log.css index 913c46ed1..5f269284f 100644 --- a/src/css/devtool-log.css +++ b/src/css/devtool-log.css @@ -34,7 +34,7 @@ body { #toolbar .button:hover { background-color: #eee; } -#toolbar #filterButton.off { +body.filterOff #toolbar #filterButton { opacity: 0.25; } #content { @@ -58,7 +58,7 @@ body { #content table tr.maindoc { background-color: #eee; } -#content table tr.hidden { +body:not(.filterOff) #content table tr.hidden { display: none; } #content table tr td { diff --git a/src/js/devtool-log.js b/src/js/devtool-log.js index 31ba1f974..621e504e1 100644 --- a/src/js/devtool-log.js +++ b/src/js/devtool-log.js @@ -245,16 +245,13 @@ var unapplyFilter = function() { /******************************************************************************/ var onFilterButton = function() { - uDom('#filterButton').toggleClass('off'); - onFilterChanged(); + uDom('body').toggleClass('filterOff'); }; /******************************************************************************/ var onFilterChanged = function() { - var filterRaw = uDom('#filterButton').hasClass('off') ? - '' : - uDom('#filterExpression').val().trim(); + var filterRaw = uDom('#filterExpression').val().trim(); if ( filterRaw === '') { reFilter = null;