mirror of https://github.com/gorhill/uBlock.git
whitelist directives must override strict blocking
This commit is contained in:
parent
fa9a5068e0
commit
cf94ca5576
|
@ -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.
|
||||
|
|
Loading…
Reference in New Issue