Skip to content

Commit

Permalink
[mv3] Fix conversion of filters with important option
Browse files Browse the repository at this point in the history
  • Loading branch information
gorhill committed Jan 10, 2025
1 parent f8975e3 commit ab0f4ba
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/js/static-net-filtering.js
Original file line number Diff line number Diff line change
Expand Up @@ -769,10 +769,6 @@ class FilterImportant {
return filterDataAlloc(args[0]);
}

static dnrFromCompiled(args, rule) {
rule.priority = (rule.priority || 0) + 30;
}

static keyFromArgs() {
}

Expand Down Expand Up @@ -4463,13 +4459,17 @@ StaticNetFilteringEngine.prototype.dnrFromCompiled = function(op, context, ...ar

const realms = new Map([
[ BLOCK_REALM, { type: 'block', priority: 10 } ],
[ BLOCK_REALM | IMPORTANT_REALM, { type: 'block', priority: 40 } ],
[ ALLOW_REALM, { type: 'allow', priority: 30 } ],
[ REDIRECT_REALM, { type: 'redirect', priority: 11 } ],
[ REDIRECT_REALM | IMPORTANT_REALM, { type: 'redirect', priority: 41 } ],
[ REMOVEPARAM_REALM, { type: 'removeparam', priority: 0 } ],
[ CSP_REALM, { type: 'csp', priority: 0 } ],
[ PERMISSIONS_REALM, { type: 'permissions', priority: 0 } ],
[ URLTRANSFORM_REALM, { type: 'uritransform', priority: 0 } ],
[ HEADERS_REALM, { type: 'block', priority: 10 } ],
[ HEADERS_REALM | ALLOW_REALM, { type: 'allow', priority: 30 } ],
[ HEADERS_REALM | IMPORTANT_REALM, { type: 'allow', priority: 40 } ],
[ URLSKIP_REALM, { type: 'urlskip', priority: 0 } ],
]);
const partyness = new Map([
Expand Down

0 comments on commit ab0f4ba

Please sign in to comment.