From 2ab11603f08583a3d60183c9b04613374f01cd25 Mon Sep 17 00:00:00 2001 From: Raymond Hill Date: Wed, 6 Jan 2021 11:17:07 -0500 Subject: [PATCH] Allow everybody to use now-stable `queryprune=` Related issue: - https://github.com/uBlockOrigin/uBlock-issues/issues/760 --- src/js/static-filtering-parser.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/js/static-filtering-parser.js b/src/js/static-filtering-parser.js index 1214457d0..e5c645b96 100644 --- a/src/js/static-filtering-parser.js +++ b/src/js/static-filtering-parser.js @@ -2527,10 +2527,7 @@ const NetOptionsIterator = class { { const i = this.tokenPos[OPTTokenQueryprune]; if ( i !== -1 ) { - if ( - this.parser.expertMode === false || - hasBits(allBits, OPTNonNetworkType) - ) { + if ( hasBits(allBits, OPTNonNetworkType) ) { optSlices[i] = OPTTokenInvalid; if ( this.interactive ) { this.parser.errorSlices(optSlices[i+1], optSlices[i+5]); @@ -2572,7 +2569,10 @@ const NetOptionsIterator = class { { const i = this.tokenPos[OPTTokenHeader]; if ( i !== -1 ) { - if ( hasBits(allBits, OPTModifierType) ) { + if ( + this.parser.expertMode === false || + hasBits(allBits, OPTModifierType) + ) { optSlices[i] = OPTTokenInvalid; if ( this.interactive ) { this.parser.errorSlices(optSlices[i+1], optSlices[i+5]);