mirror of https://github.com/gorhill/uBlock.git
Internally support no-filtering as default mode
Even though this cannot be set through the user interface.
This commit is contained in:
parent
6afe74d584
commit
8616b395b2
|
@ -131,13 +131,17 @@ async function setFilteringModeDetails(afterDetails) {
|
||||||
id: TRUSTED_DIRECTIVE_BASE_RULE_ID,
|
id: TRUSTED_DIRECTIVE_BASE_RULE_ID,
|
||||||
action: { type: 'allowAllRequests' },
|
action: { type: 'allowAllRequests' },
|
||||||
condition: {
|
condition: {
|
||||||
requestDomains: [],
|
|
||||||
resourceTypes: [ 'main_frame' ],
|
resourceTypes: [ 'main_frame' ],
|
||||||
},
|
},
|
||||||
priority: 100,
|
priority: 100,
|
||||||
};
|
};
|
||||||
if ( actualDetails.none.size ) {
|
if ( actualDetails.none.size !== 0 ) {
|
||||||
|
if (
|
||||||
|
actualDetails.none.size !== 1 ||
|
||||||
|
actualDetails.none.has('all-urls') === false
|
||||||
|
) {
|
||||||
rule.condition.requestDomains = Array.from(actualDetails.none);
|
rule.condition.requestDomains = Array.from(actualDetails.none);
|
||||||
|
}
|
||||||
addRules.push(rule);
|
addRules.push(rule);
|
||||||
dynamicRuleMap.set(TRUSTED_DIRECTIVE_BASE_RULE_ID, rule);
|
dynamicRuleMap.set(TRUSTED_DIRECTIVE_BASE_RULE_ID, rule);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue