Better label formatting for Tor Browser overriding options.

This commit is contained in:
hackademix 2023-03-30 10:43:09 +02:00
parent aab887c272
commit 85af6664f7
No known key found for this signature in database
GPG Key ID: 231A83AFDA9C2434
1 changed files with 3 additions and 1 deletions

View File

@ -75,7 +75,9 @@ var UI = (() => {
if (label) {
const browserName = (await browser.runtime.getBrowserInfo()).name;
if (browserName !== "Firefox") {
label.textContent = label.textContent.replace(/\bTor Browser\b/g, browserName);
label.textContent = label.textContent.replace(/\bTor Browser\b/g,
browserName.replace(/([\w])(Browser)$/, "$1 $2")
);
}
}
document.documentElement.classList.add("tor");