1
0
mirror of https://github.com/gorhill/uBlock.git synced 2024-07-05 11:37:01 +02:00

Add stackToMatch vararg to trusted-prune-inbound-object.js

As discussed with filter list maintainers.
This commit is contained in:
Raymond Hill 2023-11-09 19:57:51 -05:00
parent 574bd8fba3
commit 7dd98258e9
No known key found for this signature in database
GPG Key ID: 25E1490B761470C2

View File

@ -4123,6 +4123,7 @@ function trustedPruneInboundObject(
if ( rawNeedlePaths !== '' ) {
needlePaths.push(...rawNeedlePaths.split(/ +/));
}
const stackNeedle = safe.initPattern(extraArgs.stackToMatch || '', { canNegate: true });
const mustProcess = root => {
for ( const needlePath of needlePaths ) {
if ( objectFindOwnerFn(root, needlePath) === false ) {
@ -4150,7 +4151,7 @@ function trustedPruneInboundObject(
objBefore,
rawPrunePaths,
rawNeedlePaths,
{ matchAll: true },
stackNeedle,
extraArgs
);
args[argIndex-1] = objAfter || objBefore;