From 5de9230cee056105761f576537f22809e8dac613 Mon Sep 17 00:00:00 2001 From: hackademix Date: Thu, 16 Feb 2023 11:32:28 +0100 Subject: [PATCH] Fixed "Firefox" being shown instead of "Tor Browser" in the Security Level override option label. --- src/ui/ui.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/ui/ui.js b/src/ui/ui.js index 6808cee..e133d6d 100644 --- a/src/ui/ui.js +++ b/src/ui/ui.js @@ -71,10 +71,12 @@ var UI = (() => { debug = () => {}; // be quiet! } if (UI.local.isTorBrowser) { - let label = document.querySelector("span.tor"); + const label = document.querySelector("span.tor"); if (label) { - label.textContent = label.textContent.replace(/\bTor Browser\b/g, - (await browser.runtime.getBrowserInfo()).name) + const browserName = (await browser.runtime.getBrowserInfo()).name; + if (browserName !== "Firefox") { + label.textContent = browserName; + } } document.documentElement.classList.add("tor"); Sites.onionSecure = true;