From cf94ca55760128e544dc14471ef13b0c17fd5e6a Mon Sep 17 00:00:00 2001 From: gorhill Date: Fri, 10 Apr 2015 13:00:34 -0400 Subject: [PATCH] whitelist directives must override strict blocking --- src/js/traffic.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/js/traffic.js b/src/js/traffic.js index f9175fe0e..2f89bff94 100644 --- a/src/js/traffic.js +++ b/src/js/traffic.js @@ -199,6 +199,11 @@ var onBeforeRootFrameRequest = function(details) { var result = ''; + // If the site is whitelisted, disregard strict blocking + if ( µb.getNetFilteringSwitch(requestURL) === false ) { + result = 'ua:whitelisted'; + } + // Permanently unrestricted? if ( result === '' && µb.hnSwitches.evaluateZ('dontBlockDoc', requestHostname) ) { result = 'ua:dontBlockDoc true'; @@ -217,7 +222,7 @@ var onBeforeRootFrameRequest = function(details) { } // Filtering - if ( result === '' && µb.getNetFilteringSwitch(requestURL) ) { + if ( result === '' ) { result = µb.staticNetFilteringEngine.matchString(context); // https://github.com/chrisaljoudi/uBlock/issues/1128 // Do not block if the match begins after the hostname.