mirror of
https://github.com/gorhill/uBlock.git
synced 2026-03-11 09:04:36 +00:00
[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:
parent
aedaa97867
commit
2b63dcdcb6
1 changed files with 6 additions and 1 deletions
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue