From 98269dc4b0907290081333b7260259fd8e4a7213 Mon Sep 17 00:00:00 2001 From: hackademix Date: Wed, 9 Oct 2019 14:49:28 +0200 Subject: [Tor] Display .onion sites as "secure" in the UI (tickets #27313 and #27307). --- src/ui/ui.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/ui/ui.js b/src/ui/ui.js index 2ebaa41..5c358be 100644 --- a/src/ui/ui.js +++ b/src/ui/ui.js @@ -631,10 +631,11 @@ var UI = (() => { siteMatch = site; } let secure = Sites.isSecureDomainKey(siteMatch); + let isOnion = UI.local.isTorBrowser && hostname && hostname.endsWith(".onion"); let keyStyle = secure ? "secure" : !domain || /^\w+:/.test(siteMatch) ? - (url.protocol === "https:" ? "full" : "unsafe") - : domain === hostname ? "domain" : "host"; + (url.protocol === "https:" || isOnion ? "full" : "unsafe") + : isOnion ? "secure" : domain === hostname ? "domain" : "host"; let urlContainer = row.querySelector(".url"); urlContainer.dataset.key = keyStyle; -- cgit v1.2.3