Skip to content

Commit e645fe7

Browse files
committed
[mv3] Fix browser permissions scanning at launch
Related issue: uBlockOrigin/uBOL-home#410
1 parent b682969 commit e645fe7

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

platform/mv3/extension/js/mode-manager.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -361,16 +361,20 @@ export async function syncWithBrowserPermissions() {
361361
const { optimal, complete } = filteringModes;
362362
for ( const hn of optimal ) {
363363
if ( allowedHostnames.has(hn) ) { continue; }
364+
if ( isDescendantHostnameOfIter(hn, allowedHostnames) ) { continue; }
364365
optimal.delete(hn);
365366
modified = true;
366367
}
367368
for ( const hn of complete ) {
368369
if ( allowedHostnames.has(hn) ) { continue; }
370+
if ( isDescendantHostnameOfIter(hn, allowedHostnames) ) { continue; }
369371
complete.delete(hn);
370372
modified = true;
371373
}
374+
if ( modified ) {
375+
await writeFilteringModeDetails(filteringModes);
376+
}
372377
}
373-
await writeFilteringModeDetails(filteringModes);
374378
return modified;
375379
}
376380

0 commit comments

Comments
 (0)