summaryrefslogtreecommitdiff
path: root/src/ui
diff options
context:
space:
mode:
authorhackademix2018-09-04 18:48:14 +0200
committerhackademix2018-09-04 19:28:16 +0200
commit26470b84f681b7db9e500bb4503eab7b8b202879 (patch)
tree842228c86ab61eb149868752479b53f19b05d9c9 /src/ui
parentdf149a5a5578f3d34ba404836fccca8d2cfa508e (diff)
downloadnoscript-26470b84f681b7db9e500bb4503eab7b8b202879.tar.gz
noscript-26470b84f681b7db9e500bb4503eab7b8b202879.tar.xz
noscript-26470b84f681b7db9e500bb4503eab7b8b202879.zip
Transparent support for FQDNs and better management of file:/// URLs.
Diffstat (limited to 'src/ui')
-rw-r--r--src/ui/popup.js8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/ui/popup.js b/src/ui/popup.js
index c876ed7..aed981b 100644
--- a/src/ui/popup.js
+++ b/src/ui/popup.js
@@ -183,8 +183,12 @@ addEventListener("unload", e => {
if (domains.has(origin)) {
if (justDomains) return domains.get(origin);
} else {
- let domain = tld.getDomain(url.hostname) || origin;
- domain = url.protocol === "https:" ? Sites.secureDomainKey(domain) : domain;
+ let domain = tld.getDomain(url.hostname);
+ if (domain) {
+ domain = url.protocol === "https:" ? Sites.secureDomainKey(domain) : domain;
+ } else {
+ domain = url.protocol;
+ }
domains.set(origin, domain);
if (justDomains) return domain;
}