Skip to content

Loading…

Whitelist directives must override strict blocking #1228

Closed
wants to merge 2 commits into from

1 participant

@gorhill

No description provided.

@gorhill

Ok, I see the pull request includes my revert commit to go back to the fork point... I guess I need to do a hard reset instead of a soft one. Need to read more about all this git stuff.

Will fix this and re-submit later.

@gorhill gorhill closed this
@gorhill gorhill deleted the gorhill:chrisaljoudi branch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Apr 10, 2015
  1. @gorhill

    Merge pull request #13 from chrisaljoudi/master

    gorhill committed
    Keeping an official repo branch so I can make pull requests
  2. @gorhill
This page is out of date. Refresh to see the latest.
Showing with 6 additions and 1 deletion.
  1. +6 −1 src/js/traffic.js
View
7 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.
Something went wrong with that request. Please try again.