mirror of
https://github.com/gorhill/uBlock.git
synced 2026-03-11 09:04:36 +00:00
[mv3] Fix browser permissions scanning at launch
Related issue: https://github.com/uBlockOrigin/uBOL-home/issues/410
This commit is contained in:
parent
b6829698cc
commit
e645fe7468
1 changed files with 5 additions and 1 deletions
|
|
@ -361,16 +361,20 @@ export async function syncWithBrowserPermissions() {
|
|||
const { optimal, complete } = filteringModes;
|
||||
for ( const hn of optimal ) {
|
||||
if ( allowedHostnames.has(hn) ) { continue; }
|
||||
if ( isDescendantHostnameOfIter(hn, allowedHostnames) ) { continue; }
|
||||
optimal.delete(hn);
|
||||
modified = true;
|
||||
}
|
||||
for ( const hn of complete ) {
|
||||
if ( allowedHostnames.has(hn) ) { continue; }
|
||||
if ( isDescendantHostnameOfIter(hn, allowedHostnames) ) { continue; }
|
||||
complete.delete(hn);
|
||||
modified = true;
|
||||
}
|
||||
if ( modified ) {
|
||||
await writeFilteringModeDetails(filteringModes);
|
||||
}
|
||||
}
|
||||
await writeFilteringModeDetails(filteringModes);
|
||||
return modified;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue