[mv3] Force register content scripts when none are found

Possibly will fix cases of no content scripts found in Safari.

Related issue:
https://github.com/uBlockOrigin/uAssets/issues/30158#issuecomment-3869144473
This commit is contained in:
Raymond Hill 2026-02-09 09:25:57 -05:00
parent aedaa97867
commit 2b63dcdcb6
No known key found for this signature in database
GPG key ID: F5630CAE62A14316

View file

@ -680,7 +680,7 @@ async function startSession() {
const shouldInject = isNewVersion || permissionsUpdated ||
isSideloaded && rulesetConfig.developerMode;
if ( shouldInject ) {
registerInjectables();
await registerInjectables();
}
// Cosmetic filtering-related content scripts cache fitlering data in
@ -730,6 +730,11 @@ async function start() {
scrmgr.onWakeupRun();
}
const scripts = await scrmgr.getRegisteredContentScripts();
if ( scripts.length === 0 ) {
registerInjectables();
}
toggleDeveloperMode(rulesetConfig.developerMode);
}