diff options
author | hackademix | 2019-10-09 14:49:28 +0200 |
---|---|---|
committer | hackademix | 2019-10-09 14:59:19 +0200 |
commit | 98269dc4b0907290081333b7260259fd8e4a7213 (patch) | |
tree | 3b1085acf5d4133f2aaa5ba0043aa570a7cb818b | |
parent | a0343e16c24b10560791e06b5bb45c50b3de6c70 (diff) | |
download | noscript-98269dc4b0907290081333b7260259fd8e4a7213.tar.gz noscript-98269dc4b0907290081333b7260259fd8e4a7213.tar.xz noscript-98269dc4b0907290081333b7260259fd8e4a7213.zip |
[Tor] Display .onion sites as "secure" in the UI (tickets #27313 and #27307).
-rw-r--r-- | src/ui/ui.js | 5 |
1 files 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; |