From 26470b84f681b7db9e500bb4503eab7b8b202879 Mon Sep 17 00:00:00 2001 From: hackademix Date: Tue, 4 Sep 2018 18:48:14 +0200 Subject: Transparent support for FQDNs and better management of file:/// URLs. --- src/ui/popup.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/ui/popup.js') 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; } -- cgit v1.2.3