Skip to content
Snippets Groups Projects
Commit 4a1d916e authored by Pier Angelo Vendrame's avatar Pier Angelo Vendrame :jack_o_lantern: Committed by Beatriz Rizental
Browse files

fixup! TB 11698: Incorporate Tor Browser Manual pages into Tor Browser

Fix oncommands
parent 6932645a
Branches
Tags
1 merge request!1507Rebase Tor Browser onto 136.0a1
......@@ -428,7 +428,6 @@
have their strings defined by appmenu-data-l10n-id. -->
<!-- Add Tor Browser manual link -->
<menuitem id="torBrowserUserManual"
oncommand="gBrowser.selectedTab = gBrowser.addTab('about:manual', {triggeringPrincipal: Services.scriptSecurityManager.getSystemPrincipal()});"
data-l10n-id="menu-open-tor-manual"
appmenu-data-l10n-id="appmenu-open-tor-manual"/>
<menuitem id="menu_openHelp"
......
......@@ -106,6 +106,12 @@ document.addEventListener(
case "helpPolicySupport":
openTrustedLinkIn(Services.policies.getSupportMenu().URL.href, "tab");
break;
case "torBrowserUserManual":
gBrowser.selectedTab = gBrowser.addTab("about:manual", {
triggeringPrincipal:
Services.scriptSecurityManager.getSystemPrincipal(),
});
break;
}
});
......
......@@ -210,6 +210,10 @@ static nsAutoCString GetAboutModuleName(nsIURI* aURI) {
static nsTHashSet<nsCStringHashKey> GetManualLocales() {
nsTHashSet<nsCStringHashKey> locales;
RefPtr<nsZipArchive> zip = Omnijar::GetReader(Omnijar::APP);
if (!zip) {
// Probably a local build started with ./mach run
return locales;
}
UniquePtr<nsZipFind> find;
const nsAutoCString prefix("chrome/browser/content/browser/manual/");
nsAutoCString needle = prefix;
......
......@@ -766,6 +766,12 @@ const PanelUI = {
case "appMenu_helpPolicySupport":
openTrustedLinkIn(Services.policies.getSupportMenu().URL.href, "tab");
break;
case "appMenu_torBrowserUserManual":
gBrowser.selectedTab = gBrowser.addTab("about:manual", {
triggeringPrincipal:
Services.scriptSecurityManager.getSystemPrincipal(),
});
break;
}
},
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment