diff --git a/src/js/static-net-filtering.js b/src/js/static-net-filtering.js index 18140f798..bac96673c 100644 --- a/src/js/static-net-filtering.js +++ b/src/js/static-net-filtering.js @@ -55,6 +55,7 @@ var ThirdParty = 2 << 2; var AnyType = 0 << 4; var typeNameToTypeValue = { + 'notype': 0 << 4, 'stylesheet': 1 << 4, 'image': 2 << 4, 'object': 3 << 4, @@ -2432,8 +2433,10 @@ FilterContainer.prototype.matchString = function(context) { // https://github.com/chrisaljoudi/uBlock/issues/519 // Use exact type match for anything beyond `other` // Also, be prepared to support unknown types - var type = typeNameToTypeValue[context.requestType] || typeOtherValue; - if ( type > typeOtherValue ) { + var type = typeNameToTypeValue[context.requestType]; + if ( type === undefined ) { + type = typeOtherValue; + } else if ( type > typeOtherValue ) { return this.matchStringExactType(context, context.requestURL, context.requestType); } diff --git a/src/js/traffic.js b/src/js/traffic.js index e79fd16f9..043526c9d 100644 --- a/src/js/traffic.js +++ b/src/js/traffic.js @@ -169,7 +169,7 @@ var onBeforeRootFrameRequest = function(details) { pageDomain: requestDomain, requestURL: requestURL, requestHostname: requestHostname, - requestType: 'main_frame' + requestType: 'notype' }; var result = '';