From 85af6664f7a3b7ba5a992a3767fd6806d23ac09b Mon Sep 17 00:00:00 2001 From: hackademix Date: Thu, 30 Mar 2023 10:43:09 +0200 Subject: [PATCH] Better label formatting for Tor Browser overriding options. --- src/ui/ui.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/ui/ui.js b/src/ui/ui.js index 2e88b0a..7a3fb6b 100644 --- a/src/ui/ui.js +++ b/src/ui/ui.js @@ -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");