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

Fix logging code in trusted-replace-argument scriptlet

Related feedback:
https://github.com/uBlockOrigin/uBlock-discussions/discussions/859#discussioncomment-8368839
This commit is contained in:
Raymond Hill 2024-02-14 11:41:58 -05:00
parent e16cedb18d
commit ebb110fb3e
No known key found for this signature in database
GPG Key ID: 25E1490B761470C2

View File

@ -4650,7 +4650,7 @@ function trustedReplaceArgument(
const argBefore = arglist[argpos];
if ( reCondition.test(argBefore) === false ) { return reflector(...args); }
arglist[argpos] = normalValue;
safe.uboLog(logPrefix, `Replaced argument:\nBefore: ${argBefore.trim()}\nAfter: ${normalValue}`);
safe.uboLog(logPrefix, `Replaced argument:\nBefore: ${JSON.stringify(argBefore)}\nAfter: ${normalValue}`);
return reflector(...args);
});
}