whitelist directives must override strict blocking

This commit is contained in:
gorhill 2015-04-10 13:00:34 -04:00
parent fa9a5068e0
commit cf94ca5576
1 changed files with 6 additions and 1 deletions

View File

@ -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.