Index: lib/filterClasses.js |
=================================================================== |
--- a/lib/filterClasses.js |
+++ b/lib/filterClasses.js |
@@ -307,17 +307,17 @@ ActiveFilter.prototype = |
* @type Object |
*/ |
get domains() |
{ |
let domains = null; |
if (this.domainSource) |
{ |
- let list = this.domainSource.split(this.domainSeparator); |
+ let list = this.domainSource.toUpperCase().split(this.domainSeparator); |
Wladimir Palant
2014/04/08 12:10:05
I see, I didn't realize what this was doing.
The
|
if (list.length == 1 && list[0][0] != "~") |
{ |
// Fast track for the common one-domain scenario |
domains = {__proto__: null, "": false}; |
if (this.ignoreTrailingDot) |
list[0] = list[0].replace(/\.+$/, ""); |
domains[list[0]] = true; |
} |
@@ -347,17 +347,17 @@ ActiveFilter.prototype = |
if (!domains) |
domains = {__proto__: null}; |
domains[domain] = include; |
} |
domains[""] = !hasIncludes; |
} |
- delete this.domainSource; |
+ this.domainSource = null; |
} |
this.__defineGetter__("domains", function() domains); |
return this.domains; |
}, |
/** |
* Checks whether this filter is active on a domain. |
@@ -740,17 +740,17 @@ WhitelistFilter.prototype = |
* @param {String} text see Filter() |
* @param {String} domains (optional) Host names or domains the filter should be restricted to |
* @param {String} selector CSS selector for the HTML elements that should be hidden |
* @constructor |
* @augments ActiveFilter |
*/ |
function ElemHideBase(text, domains, selector) |
{ |
- ActiveFilter.call(this, text, domains ? domains.toUpperCase() : null); |
+ ActiveFilter.call(this, text, domains || null); |
if (domains) |
this.selectorDomain = domains.replace(/,~[^,]+/g, "").replace(/^~[^,]+,?/, "").toLowerCase(); |
this.selector = selector; |
} |
exports.ElemHideBase = ElemHideBase; |
ElemHideBase.prototype = |