[mv3] Fix browser permissions scanning at launch

Related issue:
https://github.com/uBlockOrigin/uBOL-home/issues/410
This commit is contained in:
Raymond Hill 2025-08-07 12:44:27 -04:00
parent b6829698cc
commit e645fe7468
No known key found for this signature in database
GPG key ID: 25E1490B761470C2

View file

@ -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;
}