Use the actual browser's brand name for Tor Browser derivatives.

This commit is contained in:
hackademix 2023-01-26 11:40:24 -06:00
parent 97131f4abb
commit 76838e679b
No known key found for this signature in database
GPG Key ID: 231A83AFDA9C2434
1 changed files with 6 additions and 1 deletions

View File

@ -70,8 +70,13 @@ var UI = (() => {
if (!UI.local.debug) {
debug = () => {}; // be quiet!
}
document.documentElement.classList.toggle("tor", !!UI.local.isTorBrowser);
if (UI.local.isTorBrowser) {
let label = document.querySelector("span.tor");
if (label) {
label.textContent = label.textContent.replace(/\bTor Browser\b/g,
(await browser.runtime.getBrowserInfo()).name)
}
document.documentElement.classList.add("tor");
Sites.onionSecure = true;
}
}