mirror of
https://github.com/gorhill/uBlock.git
synced 2024-11-20 01:12:38 +01:00
Make fine-tuned json-prune-[...]
scriptlets the default behavior
As discussed with filter list maintainers.
This commit is contained in:
parent
05ae51beb2
commit
5a24fad8ad
@ -982,12 +982,9 @@ function jsonPruneFetchResponseFn(
|
||||
let outcome = 'match';
|
||||
if ( propNeedles.size !== 0 ) {
|
||||
const objs = [ args[0] instanceof Object ? args[0] : { url: args[0] } ];
|
||||
if ( extraArgs.version === 2 && objs[0] instanceof Request ) {
|
||||
try {
|
||||
objs[0] = safe.Request_clone.call(objs[0]);
|
||||
} catch(ex) {
|
||||
safe.uboLog(ex);
|
||||
}
|
||||
if ( objs[0] instanceof Request ) {
|
||||
try { objs[0] = safe.Request_clone.call(objs[0]); }
|
||||
catch(ex) { log(ex); }
|
||||
}
|
||||
if ( args[1] instanceof Object ) {
|
||||
objs.push(args[1]);
|
||||
@ -1080,8 +1077,9 @@ function replaceFetchResponseFn(
|
||||
let outcome = 'match';
|
||||
if ( propNeedles.size !== 0 ) {
|
||||
const objs = [ args[0] instanceof Object ? args[0] : { url: args[0] } ];
|
||||
if ( extraArgs.version === 2 && objs[0] instanceof Request ) {
|
||||
try { objs[0] = safe.Request_clone.call(objs[0]); } catch(ex) {}
|
||||
if ( objs[0] instanceof Request ) {
|
||||
try { objs[0] = safe.Request_clone.call(objs[0]); }
|
||||
catch(ex) { log(ex); }
|
||||
}
|
||||
if ( args[1] instanceof Object ) {
|
||||
objs.push(args[1]);
|
||||
|
Loading…
Reference in New Issue
Block a user