1
0
mirror of https://github.com/gorhill/uBlock.git synced 2024-09-15 15:32:28 +02:00
This commit is contained in:
Raymond Hill 2014-11-24 11:28:36 -02:00
parent 26518df057
commit dc16a5c673
2 changed files with 11 additions and 2 deletions

View File

@ -88,6 +88,9 @@ p {
cursor: pointer; cursor: pointer;
position: relative; position: relative;
} }
#dynamicFilteringToggler.hasBlock:not(.on) {
background-color: #fbb;
}
#dynamicFilteringToggler > div { #dynamicFilteringToggler > div {
font-size: 9px; font-size: 9px;
line-height: 100%; line-height: 100%;

View File

@ -74,8 +74,9 @@ var syncDynamicFilter = function(scope, i, result) {
/******************************************************************************/ /******************************************************************************/
var syncAllDynamicFilters = function() { var syncAllDynamicFilters = function() {
var hasBlock = false;
var scopes = ['.', '/']; var scopes = ['.', '/'];
var scope, results, i; var scope, results, i, result;
while ( scope = scopes.pop() ) { while ( scope = scopes.pop() ) {
if ( stats.dynamicFilterResults.hasOwnProperty(scope) === false ) { if ( stats.dynamicFilterResults.hasOwnProperty(scope) === false ) {
continue; continue;
@ -83,9 +84,14 @@ var syncAllDynamicFilters = function() {
results = stats.dynamicFilterResults[scope]; results = stats.dynamicFilterResults[scope];
i = 5; i = 5;
while ( i-- ) { 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);
}; };
/******************************************************************************/ /******************************************************************************/