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

Commit c8cd9c5

Browse files
committed
better hostname test
1 parent 8aff806 commit c8cd9c5

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

js/abp-hide-filters.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -82,9 +82,6 @@ FilterPlain.prototype.retrieve = function(s, out) {
8282
if ( s === this.s ) {
8383
out.push(this.s);
8484
}
85-
// if ( s === this.s.slice(0, s.length) ) {
86-
// out.push(this.s);
87-
// }
8885
};
8986

9087
/******************************************************************************/
@@ -95,7 +92,7 @@ var FilterPlainHostname = function(s, hostname) {
9592
};
9693

9794
FilterPlainHostname.prototype.retrieve = function(s, out) {
98-
if ( s === this.s && pageHostname === this.hostname ) {
95+
if ( s === this.s && pageHostname.slice(-this.hostname.length) === this.hostname ) {
9996
out.push(this.s);
10097
}
10198
};

0 commit comments

Comments
 (0)