Skip to content
Snippets Groups Projects
Commit 5c166a10 authored by henry's avatar henry Committed by Beatriz Rizental
Browse files

TB 42583: Modify moz-support-link for Tor Browser.

parent e9040447
Branches
Tags
1 merge request!1527Bug 43808: Rebase 128.10.1 onto 128.11
......@@ -118,22 +118,23 @@ export default class MozSupportLink extends HTMLAnchorElement {
#setHref() {
let torManualPage = this.getAttribute("tor-manual-page");
if (torManualPage) {
const [page, anchor] = torManualPage.split("_", 2);
let locale = Services.locale.appLocaleAsBCP47;
if (locale === "ja-JP-macos") {
// Convert quirk-locale to the locale used for tor project.
locale = "ja";
}
let href = `https://tb-manual.torproject.org/${locale}/${page}/`;
if (anchor) {
href = `${href}#${anchor}`;
}
this.href = href;
this.href = `about:manual#${torManualPage}`;
return;
}
let supportPage = this.getAttribute("support-page") ?? "";
// For tor-browser we sometimes want to override firefox support links with
// our own.
// See tor-browser#40899.
switch (supportPage) {
case "preferences":
// Shown twice in preferences, both as `{ -brand-short-name } Support`.
// Instead of directing to support for preferences, we link to general
// tor browser support.
// See tor-browser#32092.
this.href = "https://support.torproject.org/tbb";
return;
// Fall through to support.mozilla.org
}
let base = MozSupportLink.SUPPORT_URL + supportPage;
this.href = this.hasAttribute("utm-content")
? formatUTMParams(this.getAttribute("utm-content"), base)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment