mirror of https://github.com/gorhill/uBlock.git
force "slow" path for scriplet injection for the time being (see #3526, https://github.com/uBlockOrigin/uAssets/issues/1492)
This commit is contained in:
parent
c5cbf5db47
commit
2999dbee5c
|
@ -2,7 +2,7 @@
|
||||||
"manifest_version": 2,
|
"manifest_version": 2,
|
||||||
|
|
||||||
"name": "uBlock Origin",
|
"name": "uBlock Origin",
|
||||||
"version": "1.15.8",
|
"version": "1.15.10",
|
||||||
|
|
||||||
"commands": {
|
"commands": {
|
||||||
"launch-element-zapper": {
|
"launch-element-zapper": {
|
||||||
|
|
|
@ -513,15 +513,25 @@ var onMessage = function(request, sender, callback) {
|
||||||
request.entity = µb.URI.entityFromDomain(request.domain);
|
request.entity = µb.URI.entityFromDomain(request.domain);
|
||||||
response.specificCosmeticFilters =
|
response.specificCosmeticFilters =
|
||||||
µb.cosmeticFilteringEngine.retrieveDomainSelectors(request, response);
|
µb.cosmeticFilteringEngine.retrieveDomainSelectors(request, response);
|
||||||
|
|
||||||
|
// https://github.com/gorhill/uBlock/issues/3526
|
||||||
|
// https://github.com/uBlockOrigin/uAssets/issues/1492
|
||||||
|
// Two distinct issues, but both are arising as a result of
|
||||||
|
// injecting scriptlets through stream filtering. So falling back
|
||||||
|
// to "slow" scriplet injection for the time being. Stream filtering
|
||||||
|
// (`##^`) should be used for when scriptlets are defeated by early
|
||||||
|
// script tags on a page.
|
||||||
|
//
|
||||||
// If response body filtering is supported, than the scriptlets have
|
// If response body filtering is supported, than the scriptlets have
|
||||||
// already been injected.
|
// already been injected.
|
||||||
if (
|
//if (
|
||||||
µb.canFilterResponseBody === false ||
|
// µb.canFilterResponseBody === false ||
|
||||||
µb.textEncode === undefined ||
|
// µb.textEncode === undefined ||
|
||||||
µb.textEncode.normalizeCharset(request.charset) === undefined
|
// µb.textEncode.normalizeCharset(request.charset) === undefined
|
||||||
) {
|
//) {
|
||||||
response.scriptlets = µb.scriptletFilteringEngine.retrieve(request);
|
response.scriptlets = µb.scriptletFilteringEngine.retrieve(request);
|
||||||
}
|
//}
|
||||||
|
|
||||||
if ( request.isRootFrame && µb.logger.isEnabled() ) {
|
if ( request.isRootFrame && µb.logger.isEnabled() ) {
|
||||||
µb.logCosmeticFilters(tabId);
|
µb.logCosmeticFilters(tabId);
|
||||||
}
|
}
|
||||||
|
|
|
@ -839,7 +839,16 @@ var filterDocument = (function() {
|
||||||
charset: undefined
|
charset: undefined
|
||||||
};
|
};
|
||||||
request.selectors = µb.htmlFilteringEngine.retrieve(request);
|
request.selectors = µb.htmlFilteringEngine.retrieve(request);
|
||||||
request.scriptlets = µb.scriptletFilteringEngine.retrieve(request);
|
|
||||||
|
// https://github.com/gorhill/uBlock/issues/3526
|
||||||
|
// https://github.com/uBlockOrigin/uAssets/issues/1492
|
||||||
|
// Two distinct issues, but both are arising as a result of
|
||||||
|
// injecting scriptlets through stream filtering. So falling back
|
||||||
|
// to "slow" scriplet injection for the time being. Stream filtering
|
||||||
|
// (`##^`) should be used for when scriptlets are defeated by early
|
||||||
|
// script tags on a page.
|
||||||
|
//
|
||||||
|
//request.scriptlets = µb.scriptletFilteringEngine.retrieve(request);
|
||||||
|
|
||||||
if (
|
if (
|
||||||
request.selectors === undefined &&
|
request.selectors === undefined &&
|
||||||
|
|
Loading…
Reference in New Issue