mirror of
https://github.com/gorhill/uBlock.git
synced 2026-03-11 09:04:36 +00:00
[mv3] Fix overzealous strict-blocking in Safari
This commit is contained in:
parent
e048790036
commit
526af62864
1 changed files with 6 additions and 0 deletions
|
|
@ -53,6 +53,12 @@ const prepareUpdateRules = optionsBefore => {
|
|||
const { addRules, removeRuleIds } = optionsBefore;
|
||||
const addRulesAfter = addRules?.filter(isSupportedRule);
|
||||
if ( Boolean(addRulesAfter?.length || removeRuleIds?.length) === false ) { return; }
|
||||
addRulesAfter.forEach(r => {
|
||||
if ( r.action.redirect?.regexSubstitution === undefined ) { return; }
|
||||
if ( r.condition.requestDomains === undefined ) { return; }
|
||||
r.condition.domains = r.condition.requestDomains;
|
||||
delete r.condition.requestDomains;
|
||||
});
|
||||
const optionsAfter = {};
|
||||
if ( addRulesAfter?.length ) { optionsAfter.addRules = addRulesAfter; }
|
||||
if ( removeRuleIds?.length ) { optionsAfter.removeRuleIds = removeRuleIds; }
|
||||
|
|
|
|||
Loading…
Reference in a new issue