1
0
mirror of https://github.com/gorhill/uBlock.git synced 2024-09-02 17:19:38 +02:00
This commit is contained in:
Raymond Hill 2018-01-20 09:10:23 -05:00
parent dada3fe6bc
commit 51fc60223a
No known key found for this signature in database
GPG Key ID: 25E1490B761470C2

View File

@ -107,7 +107,9 @@ var FilterHostname = function(s, hostname) {
FilterHostname.prototype.fid = 8;
FilterHostname.prototype.retrieve = function(hostname, out) {
if ( hostname.endsWith(this.hostname) ) {
if ( hostname.endsWith(this.hostname) === false ) { return; }
var i = hostname.length - this.hostname.length;
if ( i === 0 || hostname.charCodeAt(i-1) === 0x2E /* '.' */ ) {
out.add(this.s);
}
};