mirror of https://github.com/gorhill/uBlock.git
Make parser take into account `filterOnHeaders` setting
Related feedback: - https://github.com/uBlockOrigin/uBlock-issues/issues/1134#issuecomment-1460638431
This commit is contained in:
parent
bbd9470a98
commit
890aabaae9
|
@ -288,6 +288,7 @@ CodeMirror.defineMode('ubo-static-filtering', function() {
|
|||
hintHelperRegistered = true;
|
||||
initHints();
|
||||
}
|
||||
astParser.options.filterOnHeaders = details.filterOnHeaders === true;
|
||||
},
|
||||
parser: astParser,
|
||||
};
|
||||
|
|
|
@ -1519,6 +1519,7 @@ const onMessage = function(request, sender, callback) {
|
|||
response.preparseDirectiveHints =
|
||||
sfp.utils.preparser.getHints();
|
||||
response.expertMode = µb.hiddenSettings.filterAuthorMode;
|
||||
response.filterOnHeaders = µb.hiddenSettings.filterOnHeaders;
|
||||
}
|
||||
if ( request.hintUpdateToken !== µb.pageStoresToken ) {
|
||||
response.originHints = getOriginHints();
|
||||
|
|
|
@ -1221,7 +1221,7 @@ export class AstFilterParser {
|
|||
realBad = isException === false || isNegated || hasValue;
|
||||
break;
|
||||
case NODE_TYPE_NET_OPTION_NAME_HEADER:
|
||||
realBad = this.expertMode === false || isNegated || hasValue === false;
|
||||
realBad = this.options.filterOnHeaders !== true || isNegated || hasValue === false;
|
||||
break;
|
||||
case NODE_TYPE_NET_OPTION_NAME_IMPORTANT:
|
||||
realBad = isException || isNegated || hasValue;
|
||||
|
|
Loading…
Reference in New Issue