mirror of
https://github.com/encounter/uBlock.git
synced 2026-03-30 11:41:36 -07:00
this fixes #1134
This commit is contained in:
@@ -321,7 +321,11 @@ var is3rdParty = function(srcHostname, desHostname) {
|
||||
}
|
||||
var srcDomain = domainFromHostname(srcHostname);
|
||||
if ( srcDomain === '' ) {
|
||||
srcDomain = desHostname;
|
||||
if ( srcHostname !== '' ) {
|
||||
srcDomain = srcHostname;
|
||||
} else {
|
||||
srcDomain = desHostname;
|
||||
}
|
||||
}
|
||||
if ( desHostname.slice(0 - srcDomain.length) !== srcDomain ) {
|
||||
return true;
|
||||
|
||||
+3
-3
@@ -384,8 +384,8 @@ NetFilteringResultCache.prototype.pruneAsyncCallback = function() {
|
||||
|
||||
/******************************************************************************/
|
||||
|
||||
NetFilteringResultCache.prototype.lookup = function(url) {
|
||||
return this.urls[url];
|
||||
NetFilteringResultCache.prototype.lookup = function(context) {
|
||||
return this.urls[context.requestType + ' ' + context.requestURL];
|
||||
};
|
||||
|
||||
/******************************************************************************/
|
||||
@@ -645,7 +645,7 @@ PageStore.prototype.filterRequest = function(context) {
|
||||
return '';
|
||||
}
|
||||
|
||||
var entry = this.netFilteringCache.lookup(context.requestURL);
|
||||
var entry = this.netFilteringCache.lookup(context);
|
||||
if ( entry !== undefined ) {
|
||||
//console.debug('cache HIT: PageStore.filterRequest("%s")', context.requestURL);
|
||||
return entry.result;
|
||||
|
||||
Reference in New Issue
Block a user