1
0
mirror of https://github.com/gorhill/uBlock.git synced 2024-11-05 18:32:30 +01:00

Fix cosmetic exception filters not applying

Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/575

Regression from:
- 93f80eedfa

Specific cosmetic exception filters need to be returned so that
they can be applied to generic cosmetic filters.
This commit is contained in:
Raymond Hill 2019-05-15 14:43:59 -04:00
parent c7048617ee
commit 1fe3b54acc
No known key found for this signature in database
GPG Key ID: 25E1490B761470C2

View File

@ -670,6 +670,7 @@ FilterContainer.prototype.skipGenericCompiledContent = function(reader) {
// hash, example.com, .promoted-tweet
// hash, example.*, .promoted-tweet
case 8:
this.duplicateBuster.add(fingerprint);
this.specificFilters.store(args[1], args[2], args[3]);
break;
@ -1004,11 +1005,14 @@ FilterContainer.prototype.retrieveSpecificSelectors = function(
);
}
// Apply exceptions.
for ( const exception of exceptionSet ) {
specificSet.delete(exception);
proceduralSet.delete(exception);
if ( exceptionSet.size !== 0 ) {
out.exceptionFilters = Array.from(exceptionSet);
for ( const exception of exceptionSet ) {
specificSet.delete(exception);
proceduralSet.delete(exception);
}
}
if ( specificSet.size !== 0 ) {
out.declarativeFilters = Array.from(specificSet);
}