summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhackademix2018-08-19 01:37:10 +0200
committerhackademix2018-08-19 01:37:10 +0200
commitf1e8ec1859cab6a1dccd013e190a150bfbca8edc (patch)
tree073963752ec16ac8d250e5dc16ad412c80e3bc30
parent8e1dc9e0eed868eb6bf7924dd8fa33f7f5f66a57 (diff)
downloadnoscript-f1e8ec1859cab6a1dccd013e190a150bfbca8edc.tar.gz
noscript-f1e8ec1859cab6a1dccd013e190a150bfbca8edc.tar.xz
noscript-f1e8ec1859cab6a1dccd013e190a150bfbca8edc.zip
Updated tld.js working copy.
-rw-r--r--TLD/tld.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/TLD/tld.js b/TLD/tld.js
index 78dc029..8789477 100644
--- a/TLD/tld.js
+++ b/TLD/tld.js
@@ -12,9 +12,11 @@ var tld = {
pos = domain.search(this._tldRx);
if (pos === -1) {
// TLD not in the public suffix list, fall back to the "one-dot rule"
+ // (for a.b.c.tld, assume the domain to be "c.tld")
pos = domain.lastIndexOf(".");
if (pos === -1) {
- return "";
+ // No dots at all? Likely a private domain in a LAN.
+ return domain;
}
}
pos = domain.lastIndexOf(".", pos - 1) + 1;