mirror of
https://github.com/gorhill/uBlock.git
synced 2024-11-25 03:43:25 +01:00
this fixes #1127 (regression bug)
This commit is contained in:
parent
ba7b7b5113
commit
a16ba964df
@ -233,7 +233,11 @@ var hostnameTestPicker = function(owner) {
|
||||
|
||||
// Only one hostname
|
||||
if ( domainOpt.indexOf('|') === -1 ) {
|
||||
return domainOpt.startsWith('~') ? hostnameMissTest : hostnameHitTest;
|
||||
if ( domainOpt.startsWith('~') ) {
|
||||
owner._notHostname = domainOpt.slice(1);
|
||||
return hostnameMissTest;
|
||||
}
|
||||
return hostnameHitTest;
|
||||
}
|
||||
|
||||
// Multiple hostnames: use a dictionary.
|
||||
@ -295,7 +299,7 @@ var hostnameHitTest = function(owner) {
|
||||
|
||||
var hostnameMissTest = function(owner) {
|
||||
var current = pageHostnameRegister;
|
||||
var target = owner.domainOpt;
|
||||
var target = owner._notHostname;
|
||||
return current.endsWith(target) === false ||
|
||||
(current.length !== target.length &&
|
||||
current.charAt(current.length - target.length - 1) !== '.');
|
||||
|
Loading…
Reference in New Issue
Block a user