mirror of https://github.com/gorhill/uBlock.git
code review for last commit
This commit is contained in:
parent
a2caf3c42d
commit
44bbf356f7
|
@ -693,12 +693,10 @@ PageStore.prototype.filterRequestNoCache = function(context) {
|
||||||
|
|
||||||
// https://github.com/chrisaljoudi/uBlock/pull/1209
|
// https://github.com/chrisaljoudi/uBlock/pull/1209
|
||||||
// Not ideal, but until something better is figured, this solves the issue.
|
// Not ideal, but until something better is figured, this solves the issue.
|
||||||
// This works so long as there is no `rootURL` property added to the page
|
// Long term, I have some ideas I would like to test to take care of those
|
||||||
// store. Long term, I have some ideas I would like to test to take care
|
// cases for which a page store may not have been definitely bound to a tab.
|
||||||
// of those cases for which a page store may not have been definitely
|
if ( context.overrideStore ) {
|
||||||
// bound to a tab.
|
if ( µb.getNetFilteringSwitch(context.requestURL) === false ) {
|
||||||
if ( typeof context.rootURL === 'string' ) {
|
|
||||||
if ( µb.getNetFilteringSwitch(context.rootURL) === false ) {
|
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
} else if ( this.getNetFilteringSwitch() === false ) {
|
} else if ( this.getNetFilteringSwitch() === false ) {
|
||||||
|
|
|
@ -384,9 +384,9 @@ var onHeadersReceived = function(details) {
|
||||||
if ( details.parentFrameId === -1 ) {
|
if ( details.parentFrameId === -1 ) {
|
||||||
var contextDomain = µb.URI.domainFromHostname(requestHostname);
|
var contextDomain = µb.URI.domainFromHostname(requestHostname);
|
||||||
// https://github.com/chrisaljoudi/uBlock/pull/1209
|
// https://github.com/chrisaljoudi/uBlock/pull/1209
|
||||||
// Adding `rootURL` solves the issue.
|
// Using `overrideStore` solves the issue.
|
||||||
context = {
|
context = {
|
||||||
rootURL: requestURL,
|
overrideStore: true,
|
||||||
rootHostname: requestHostname,
|
rootHostname: requestHostname,
|
||||||
rootDomain: contextDomain,
|
rootDomain: contextDomain,
|
||||||
pageHostname: requestHostname,
|
pageHostname: requestHostname,
|
||||||
|
|
Loading…
Reference in New Issue