mirror of https://github.com/gorhill/uBlock.git
Fix regression in handling of experimental `header=` filter option
Also completed fix for reverse lookup issues related to `header=` filter option: https://github.com/uBlockOrigin/uBlock-issues/issues/1932
This commit is contained in:
parent
0da7e12ea4
commit
aa6baf9a29
|
@ -70,7 +70,9 @@ let cachedUserFilters = '';
|
|||
if ( response instanceof Object === false ) { return; }
|
||||
if ( response.hintUpdateToken !== undefined ) {
|
||||
const mode = cmEditor.getMode();
|
||||
cmEditor.setOption('filterOnHeaders', response.filterOnHeaders === true);
|
||||
if ( typeof response.filterOnHeaders === 'boolean' ) {
|
||||
cmEditor.setOption('filterOnHeaders', response.filterOnHeaders);
|
||||
}
|
||||
if ( mode.setHints instanceof Function ) {
|
||||
mode.setHints(response);
|
||||
}
|
||||
|
|
|
@ -131,8 +131,9 @@ const fromNetFilter = async function(rawFilter) {
|
|||
const writer = new CompiledListWriter();
|
||||
const parser = new sfp.AstFilterParser({
|
||||
expertMode: true,
|
||||
nativeCssHas: vAPI.webextFlavor.env.includes('native_css_has'),
|
||||
filterOnHeaders: true,
|
||||
maxTokenLength: staticNetFilteringEngine.MAX_TOKEN_LENGTH,
|
||||
nativeCssHas: vAPI.webextFlavor.env.includes('native_css_has'),
|
||||
});
|
||||
parser.parse(rawFilter);
|
||||
|
||||
|
|
|
@ -1051,8 +1051,9 @@ self.addEventListener('hiddenSettingsChanged', ( ) => {
|
|||
this.hiddenSettings.filterAuthorMode !== false;
|
||||
const parser = new sfp.AstFilterParser({
|
||||
expertMode,
|
||||
nativeCssHas: vAPI.webextFlavor.env.includes('native_css_has'),
|
||||
filterOnHeaders: µb.hiddenSettings.filterOnHeaders,
|
||||
maxTokenLength: staticNetFilteringEngine.MAX_TOKEN_LENGTH,
|
||||
nativeCssHas: vAPI.webextFlavor.env.includes('native_css_has'),
|
||||
});
|
||||
const compiler = staticNetFilteringEngine.createCompiler(parser);
|
||||
const lineIter = new LineIterator(
|
||||
|
|
Loading…
Reference in New Issue