mirror of
https://github.com/gorhill/uBlock.git
synced 2024-09-03 01:29:39 +02:00
Revert "Inject scriptlets at webNavigation.onCommitted time in Firefox"
This reverts commit 7ee9c21b37
.
Potentially related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/1696
This commit is contained in:
parent
498f90966d
commit
46eb3801ec
@ -127,6 +127,7 @@ const µBlock = { // jshint ignore:line
|
||||
privacySettingsSupported: vAPI.browserSettings instanceof Object,
|
||||
cloudStorageSupported: vAPI.cloud instanceof Object,
|
||||
canFilterResponseData: typeof browser.webRequest.filterResponseData === 'function',
|
||||
canInjectScriptletsNow: vAPI.webextFlavor.soup.has('chromium'),
|
||||
|
||||
// https://github.com/chrisaljoudi/uBlock/issues/180
|
||||
// Whitelist directives need to be loaded once the PSL is available
|
||||
|
@ -627,7 +627,10 @@ const retrieveContentScriptParameters = async function(sender, request) {
|
||||
// https://github.com/uBlockOrigin/uBlock-issues/issues/688#issuecomment-748179731
|
||||
// For non-network URIs, scriptlet injection is deferred to here. The
|
||||
// effective URL is available here in `request.url`.
|
||||
if ( isNetworkURI(sender.frameURL) === false ) {
|
||||
if (
|
||||
µb.canInjectScriptletsNow === false ||
|
||||
isNetworkURI(sender.frameURL) === false
|
||||
) {
|
||||
response.scriptlets = scriptletFilteringEngine.retrieve(request);
|
||||
}
|
||||
|
||||
|
@ -913,7 +913,11 @@ vAPI.Tabs = class extends vAPI.Tabs {
|
||||
const pageStore = µb.pageStoreFromTabId(tabId);
|
||||
if ( pageStore === null ) { return; }
|
||||
pageStore.setFrameURL(details);
|
||||
if ( isNetworkURI(url) && pageStore.getNetFilteringSwitch() ) {
|
||||
if (
|
||||
µb.canInjectScriptletsNow &&
|
||||
isNetworkURI(url) &&
|
||||
pageStore.getNetFilteringSwitch()
|
||||
) {
|
||||
scriptletFilteringEngine.injectNow(details);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user