[nscl] Updated NoScript Common Library inclusions.

This commit is contained in:
hackademix 2021-02-13 01:59:23 +01:00
parent 80088c55d3
commit 3679e9ba90
1 changed files with 7 additions and 7 deletions

View File

@ -21,24 +21,24 @@ var tld = (() => {
let excludePrivateTLD = options && options.exludePrivateTLD;
let excludeUnknownTLD = options && options.excludeUnknownTLD;
let preserveFQDNs = options && options.preserveFQDNs || this.preserveFQDNs;
if (!preserveFQDNs) host = this.normalize(host);
let parts = host.split(".");
let stack = "";
let level = -1;
let roots = excludePrivateTLD ? tlds.icann
: (tld.combined ||= Object.assign({}, tlds.icann, tlds.private));
let roots = excludePrivateTLD ? tlds.icann :
(tld.combined || (tld.combined = Object.assign({}, tlds.icann, tlds.private)));
for(let i = parts.length - 1, part; i >= 0; i--) {
part = parts[i];
stack = stack ? `${part}.${stack}` : part;
if(roots[stack])
level = roots[stack];
}
if (!excludeUnknownTLD) {
if(level === -1) {
if (this.isIp(host)) {