mirror of
https://github.com/gorhill/uBlock.git
synced 2024-11-23 10:52:43 +01:00
Add stackToMatch
vararg to trusted-prune-inbound-object.js
As discussed with filter list maintainers.
This commit is contained in:
parent
574bd8fba3
commit
7dd98258e9
@ -4123,6 +4123,7 @@ function trustedPruneInboundObject(
|
|||||||
if ( rawNeedlePaths !== '' ) {
|
if ( rawNeedlePaths !== '' ) {
|
||||||
needlePaths.push(...rawNeedlePaths.split(/ +/));
|
needlePaths.push(...rawNeedlePaths.split(/ +/));
|
||||||
}
|
}
|
||||||
|
const stackNeedle = safe.initPattern(extraArgs.stackToMatch || '', { canNegate: true });
|
||||||
const mustProcess = root => {
|
const mustProcess = root => {
|
||||||
for ( const needlePath of needlePaths ) {
|
for ( const needlePath of needlePaths ) {
|
||||||
if ( objectFindOwnerFn(root, needlePath) === false ) {
|
if ( objectFindOwnerFn(root, needlePath) === false ) {
|
||||||
@ -4150,7 +4151,7 @@ function trustedPruneInboundObject(
|
|||||||
objBefore,
|
objBefore,
|
||||||
rawPrunePaths,
|
rawPrunePaths,
|
||||||
rawNeedlePaths,
|
rawNeedlePaths,
|
||||||
{ matchAll: true },
|
stackNeedle,
|
||||||
extraArgs
|
extraArgs
|
||||||
);
|
);
|
||||||
args[argIndex-1] = objAfter || objBefore;
|
args[argIndex-1] = objAfter || objBefore;
|
||||||
|
Loading…
Reference in New Issue
Block a user