diff --git a/src/css/popup.css b/src/css/popup.css index f85cea89d..bc2e523ea 100644 --- a/src/css/popup.css +++ b/src/css/popup.css @@ -88,6 +88,9 @@ p { cursor: pointer; position: relative; } +#dynamicFilteringToggler.hasBlock:not(.on) { + background-color: #fbb; + } #dynamicFilteringToggler > div { font-size: 9px; line-height: 100%; diff --git a/src/js/popup.js b/src/js/popup.js index 0583511a5..bc733df23 100644 --- a/src/js/popup.js +++ b/src/js/popup.js @@ -74,8 +74,9 @@ var syncDynamicFilter = function(scope, i, result) { /******************************************************************************/ var syncAllDynamicFilters = function() { + var hasBlock = false; var scopes = ['.', '/']; - var scope, results, i; + var scope, results, i, result; while ( scope = scopes.pop() ) { if ( stats.dynamicFilterResults.hasOwnProperty(scope) === false ) { continue; @@ -83,9 +84,14 @@ var syncAllDynamicFilters = function() { results = stats.dynamicFilterResults[scope]; i = 5; while ( i-- ) { - syncDynamicFilter(scope, i + 1, results[i]); + result = results[i]; + syncDynamicFilter(scope, i + 1, result); + if ( scope === '.' && result.length !== 0 && result.slice(0, 2) !== '@@' ) { + hasBlock = true; + } } } + uDom('#dynamicFilteringToggler').toggleClass('hasBlock', hasBlock); }; /******************************************************************************/