Skip to content
This repository has been archived by the owner on Nov 15, 2017. It is now read-only.

Commit

Permalink
#231: code review for ABP filtering after spotting anomalies during t…
Browse files Browse the repository at this point in the history
…esting
  • Loading branch information
gorhill committed May 14, 2014
1 parent 9804e4e commit d270170
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions js/abp-filters.js
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,7 @@ var makeFilter = function(s, tokenBeg) {
}
return new FilterSingleWildcard(s, tokenBeg);
}
if ( tokenBeg === false ) {
if ( tokenBeg === 0 ) {
return new FilterPlainPrefix0(s);
}
if ( tokenBeg === 1 ) {
Expand All @@ -369,7 +369,7 @@ var makeHostnameFilter = function(s, tokenBeg, hostname) {
}
return new FilterSingleWildcardHostname(s, tokenBeg, hostname);
}
if ( tokenBeg === false ) {
if ( tokenBeg === 0 ) {
return new FilterPlainPrefix0Hostname(s, hostname);
}
if ( tokenBeg === 1 ) {
Expand All @@ -391,7 +391,7 @@ var makeNotHostnameFilter = function(s, tokenBeg, hostname) {
}
return new FilterSingleWildcardNotHostname(s, tokenBeg, hostname);
}
if ( tokenBeg === false ) {
if ( tokenBeg === 0 ) {
return new FilterPlainPrefix0NotHostname(s, hostname);
}
if ( tokenBeg === 1 ) {
Expand Down Expand Up @@ -549,11 +549,11 @@ FilterParser.prototype.parseOptHostnames = function(raw) {
}
domain = httpsburi.domainFromHostname(hostname);
if ( not ) {
this.hostnames.push(hostname);
this.domains.push(domain);
} else {
this.notHostnames.push(hostname);
this.notDomains.push(domain);
} else {
this.hostnames.push(hostname);
this.domains.push(domain);
}
}
};
Expand Down

0 comments on commit d270170

Please sign in to comment.