Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • gk/tor-browser
  • peterstory/tor-browser
  • sanketh/tor-browser
  • acat/tor-browser
  • sysrqb/tor-browser
  • boklm/tor-browser
  • dan/tor-browser
  • fabrizio/tor-browser
  • victorvw/tor-browser
  • aguestuser/tor-browser
  • WofWca/tor-browser
  • p13dz/tor-browser
  • mwolfe/tor-browser
  • tpo/applications/tor-browser
  • brade/tor-browser
  • pierov/tor-browser
  • ma1/tor-browser
  • JeremyRand/tor-browser
  • henry/tor-browser
  • msimonelli/tor-browser
  • cypherpunks1/tor-browser
  • blackZwork/tor-browser
  • starlingroot/tor-browser
  • cohosh/tor-browser
  • t-m-w/tor-browser
  • trinity-1686a/tor-browser
  • HHN/tor-browser
  • emmapeel/tor-browser
  • Achintya_Sharma/tor-browser
  • guest475646844/tor-browser
  • Mima/tor-browser
  • morgan/tor-browser
  • clairehurst/tor-browser
  • NoisyCoil/tor-browser
  • gus/tor-browser
  • Francewhoa/tor-browser
  • novialriptide/tor-browser
  • jwilde/tor-browser
  • brizental/tor-browser
  • ourhopeforfreedom/tor-browser
  • onyinyang/tor-browser
  • Noino/tor-browser
  • murmelurmel/tor-browser
43 results
Show changes
Showing
with 1467 additions and 58 deletions
......@@ -56,6 +56,8 @@ FINAL_TARGET_FILES.actors += [
"ContentSearchParent.sys.mjs",
"ContextMenuChild.sys.mjs",
"ContextMenuParent.sys.mjs",
"CryptoSafetyChild.jsm",
"CryptoSafetyParent.jsm",
"DecoderDoctorChild.sys.mjs",
"DecoderDoctorParent.sys.mjs",
"DOMFullscreenChild.sys.mjs",
......@@ -77,8 +79,6 @@ FINAL_TARGET_FILES.actors += [
"PromptParent.sys.mjs",
"RefreshBlockerChild.sys.mjs",
"RefreshBlockerParent.sys.mjs",
"RFPHelperChild.sys.mjs",
"RFPHelperParent.sys.mjs",
"ScreenshotsComponentChild.sys.mjs",
"SearchSERPTelemetryChild.sys.mjs",
"SearchSERPTelemetryParent.sys.mjs",
......@@ -90,3 +90,9 @@ FINAL_TARGET_FILES.actors += [
BROWSER_CHROME_MANIFESTS += [
"test/browser/browser.ini",
]
if CONFIG["BASE_BROWSER_UPDATE"]:
FINAL_TARGET_FILES.actors += [
"AboutTBUpdateChild.jsm",
"AboutTBUpdateParent.jsm",
]
......@@ -97,10 +97,12 @@ tools repackage:: $(DIST)/bin/$(MOZ_APP_NAME) $(objdir)/macbuild/Contents/MacOS-
rsync -aL $(DIST)/bin/$(MOZ_APP_NAME) '$(dist_dest)/Contents/MacOS'
cp -RL $(topsrcdir)/$(MOZ_BRANDING_DIRECTORY)/firefox.icns '$(dist_dest)/Contents/Resources/firefox.icns'
cp -RL $(topsrcdir)/$(MOZ_BRANDING_DIRECTORY)/document.icns '$(dist_dest)/Contents/Resources/document.icns'
ifndef BASE_BROWSER_UPDATE
$(MKDIR) -p '$(dist_dest)/Contents/Library/LaunchServices'
ifdef MOZ_UPDATER
mv -f '$(dist_dest)/Contents/MacOS/updater.app/Contents/MacOS/org.mozilla.updater' '$(dist_dest)/Contents/Library/LaunchServices'
ln -s ../../../../Library/LaunchServices/org.mozilla.updater '$(dist_dest)/Contents/MacOS/updater.app/Contents/MacOS/org.mozilla.updater'
endif
printf APPLMOZB > '$(dist_dest)/Contents/PkgInfo'
endif
printf APPLTORB > '$(dist_dest)/Contents/PkgInfo'
endif
......@@ -201,7 +201,7 @@
<key>CFBundleShortVersionString</key>
<string>@APP_VERSION@</string>
<key>CFBundleSignature</key>
<string>MOZB</string>
<string>TORB</string>
<key>CFBundleURLTypes</key>
<array>
<dict>
......
......@@ -17,7 +17,6 @@
#if defined(MOZ_CRASHREPORTER)
/minidump-analyzer
#endif
/pingsender
/pk12util
/ssltunnel
/xpcshell
......
......@@ -70,7 +70,8 @@ if CONFIG["CC_TYPE"] == "clang-cl":
if CONFIG["OS_ARCH"] == "WINNT":
RCINCLUDE = "splash.rc"
DIRS += [
"pbproxy",
# tor-browser#41798 don't build private_browsing.exe on Windows
# "pbproxy",
"winlauncher",
]
USE_LIBS += [
......
......@@ -6,26 +6,3 @@
# * permission is an integer between 1 and 15
# Permissions defined here will also be set for private browsing.
# See PermissionManager.cpp for more...
# UITour
# Bug 1557153: www.mozilla.org gets a special workaround in UITourChild.sys.mjs
# Bug 1837407: support.mozilla.org gets a special workaround for similar reasons.
origin uitour 1 https://www.mozilla.org
origin uitour 1 https://monitor.firefox.com
origin uitour 1 https://screenshots.firefox.com
origin uitour 1 https://support.mozilla.org
origin uitour 1 https://truecolors.firefox.com
origin uitour 1 about:home
origin uitour 1 about:newtab
# XPInstall
origin install 1 https://addons.mozilla.org
# Remote troubleshooting
origin remote-troubleshooting 1 https://support.mozilla.org
# addon install
origin install 1 https://fpn.firefox.com
# autoplay video/audio
origin autoplay-media 1 about:welcome
#include 001-base-profile.js
pref("app.update.notifyDuringDownload", true);
pref("app.update.url.manual", "https://www.torproject.org/download/languages/");
pref("app.update.url.details", "https://www.torproject.org/download/");
pref("app.update.badgeWaitTime", 0);
pref("app.releaseNotesURL", "about:blank");
// disables the 'What's New?' link in the about dialog, otherwise we need to
// duplicate logic for generating the url to the blog post that is already more
// easily found in about:tor
pref("app.releaseNotesURL.aboutDialog", "about:blank");
// point to our feedback url rather than Mozilla's
pref("app.feedback.baseURL", "https://support.torproject.org/%LOCALE%/get-in-touch/");
pref("browser.shell.checkDefaultBrowser", false);
// Proxy and proxy security
pref("network.proxy.socks", "127.0.0.1");
pref("network.proxy.socks_port", 9150);
pref("network.proxy.socks_remote_dns", true);
pref("network.proxy.no_proxies_on", ""); // For fingerprinting and local service vulns (#10419)
pref("network.proxy.allow_hijacking_localhost", true); // Allow proxies for localhost (#31065)
pref("network.proxy.type", 1);
// Bug 40548: Disable proxy-bypass
pref("network.proxy.failover_direct", false);
// localhost is already blocked by setting `network.proxy.allow_hijacking_localhost` to
// true, allowing users to explicitly block ports makes them fingerprintable; for details, see
// Bug 41317: Tor Browser leaks banned ports in network.security.ports.banned
pref("network.security.ports.banned", "", locked);
pref("network.dns.disabled", true); // This should cover the #5741 patch for DNS leaks
pref("network.http.max-persistent-connections-per-proxy", 256);
// Disable DNS over HTTPS. Set to explicitly off MODE_TRROFF = 5.
// See tor-browser#41906.
pref("network.trr.mode", 5, locked);
// Treat .onions as secure
pref("dom.securecontext.allowlist_onions", true);
// Disable HTTPS-Only mode for .onion domains (tor-browser#19850)
pref("dom.security.https_only_mode.upgrade_onion", false);
// Bug 40423/41137: Disable http/3
// We should re-enable it as soon as Tor gets UDP support
pref("network.http.http3.enable", false);
// 0 = do not use a second connection, see all.js and #7656
pref("network.http.connection-retry-timeout", 0);
#expand pref("torbrowser.version", __BASE_BROWSER_VERSION_QUOTED__);
// Tor Browser used to be compatible with non-Tor proxies. This feature is not
// available anymore, but this legacy preference can be still used to disable
// first-party domain circuit isolation.
// In general, it should not be used. This use-case is still supported only for
// sites that break with this isolation (and even in that case, its use should
// be reduced to the strictly required time).
pref("extensions.torbutton.use_nontor_proxy", false);
// Browser home page:
pref("browser.startup.homepage", "about:tor");
// tor-browser#40701: Add new download warning
pref("browser.download.showTorWarning", true);
// This pref specifies an ad-hoc "version" for various pref update hacks we need to do
pref("extensions.torbutton.pref_fixup_version", 0);
// Formerly tor-launcher defaults
pref("extensions.torlauncher.start_tor", true);
pref("extensions.torlauncher.prompt_at_startup", true);
pref("extensions.torlauncher.quickstart", false);
pref("extensions.torlauncher.max_tor_log_entries", 1000);
// By default, Tor Launcher configures a TCP listener for the Tor
// control port, as defined by control_host and control_port.
// Set control_port_use_ipc to true to use an IPC object (e.g., a Unix
// domain socket) instead. You may also modify control_ipc_path to
// override the default IPC object location. If a relative path is used,
// it is handled like torrc_path (see below).
pref("extensions.torlauncher.control_host", "127.0.0.1");
pref("extensions.torlauncher.control_port", 9151);
pref("extensions.torlauncher.control_port_use_ipc", false);
pref("extensions.torlauncher.control_ipc_path", "");
// By default, Tor Launcher configures a TCP listener for the Tor
// SOCKS port. The host is taken from the network.proxy.socks pref and
// the port is taken from the network.proxy.socks_port pref.
// Set socks_port_use_ipc to true to use an IPC object (e.g., a Unix
// domain socket) instead. You may also modify socks_ipc_path to
// override the default IPC object location. If a relative path is used,
// it is handled like torrc_path (see below).
// Modify socks_port_flags to use a different set of SocksPort flags (but be
// careful).
pref("extensions.torlauncher.socks_port_use_ipc", false);
pref("extensions.torlauncher.socks_ipc_path", "");
pref("extensions.torlauncher.socks_port_flags", "ExtendedErrors IPv6Traffic PreferIPv6 KeepAliveIsolateSOCKSAuth");
// The tor_path is relative to the application directory. On Linux and
// Windows this is the Browser/ directory that contains the firefox
// executables, and on Mac OS it is the TorBrowser.app directory.
pref("extensions.torlauncher.tor_path", "");
// The torrc_path and tordatadir_path are relative to the data directory,
// which is TorBrowser-Data/ if it exists as a sibling of the application
// directory. If TorBrowser-Data/ does not exist, these paths are relative
// to the TorBrowser/ directory within the application directory.
pref("extensions.torlauncher.torrc_path", "");
pref("extensions.torlauncher.tordatadir_path", "");
// BridgeDB-related preferences (used for Moat).
pref("extensions.torlauncher.bridgedb_front", "foursquare.com");
pref("extensions.torlauncher.bridgedb_reflector", "https://moat.torproject.org.global.prod.fastly.net/");
pref("extensions.torlauncher.moat_service", "https://bridges.torproject.org/moat");
pref("extensions.torlauncher.bridgedb_bridge_type", "obfs4");
// Recommended default bridge type.
// pref("extensions.torlauncher.default_bridge_recommended_type", "obfs3");
// Default bridges.
// pref("extensions.torlauncher.default_bridge.TYPE.1", "TYPE x.x.x.x:yy");
// pref("extensions.torlauncher.default_bridge.TYPE.2", "TYPE x.x.x.x:yy");
This diff is collapsed.
......@@ -50,9 +50,9 @@ pref("extensions.recommendations.themeRecommendationUrl", "https://color.firefox
pref("extensions.update.autoUpdateDefault", true);
// Check AUS for system add-on updates.
pref("extensions.systemAddon.update.url", "https://aus5.mozilla.org/update/3/SystemAddons/%VERSION%/%BUILD_ID%/%BUILD_TARGET%/%LOCALE%/%CHANNEL%/%OS_VERSION%/%DISTRIBUTION%/%DISTRIBUTION_VERSION%/update.xml");
pref("extensions.systemAddon.update.enabled", true);
// No AUS check for system add-on updates for Tor Browser users.
pref("extensions.systemAddon.update.url", "");
pref("extensions.systemAddon.update.enabled", false);
// Disable add-ons that are not installed by the user in all scopes by default.
// See the SCOPE constants in AddonManager.jsm for values to use here.
......@@ -968,7 +968,7 @@ pref("privacy.panicButton.enabled", true);
// Time until temporary permissions expire, in ms
pref("privacy.temporary_permission_expire_time_ms", 3600000);
// Enables protection mechanism against password spoofing for cross domain auh requests
// Enables protection mechanism against password spoofing for cross domain auth requests
// See bug 791594
pref("privacy.authPromptSpoofingProtection", true);
......@@ -2104,6 +2104,12 @@ pref("privacy.webrtc.sharedTabWarning", false);
// before navigating to the actual meeting room page. Doesn't survive tab close.
pref("privacy.webrtc.deviceGracePeriodTimeoutMs", 3600000);
// Enable including the content in the window title.
// PBM users might want to disable this to avoid a possible source of disk
// leaks.
pref("privacy.exposeContentTitleInWindow", true);
pref("privacy.exposeContentTitleInWindow.pbm", true);
// Start the browser in e10s mode
pref("browser.tabs.remote.autostart", true);
pref("browser.tabs.remote.desktopbehavior", true);
......
......@@ -206,7 +206,7 @@ appUpdater.prototype = {
if (aChildID == "downloadAndInstall") {
let updateVersion = gAppUpdater.update.displayVersion;
// Include the build ID if this is an "a#" (nightly or aurora) build
if (/a\d+$/.test(updateVersion)) {
if (!AppConstants.BASE_BROWSER_UPDATE && /a\d+$/.test(updateVersion)) {
let buildID = gAppUpdater.update.buildID;
let year = buildID.slice(0, 4);
let month = buildID.slice(4, 6);
......
......@@ -43,21 +43,14 @@ function init() {
}
// Include the build ID and display warning if this is an "a#" (nightly or aurora) build
let versionId = "aboutDialog-version";
let versionId = "basebrowser-about-dialog-version";
let versionAttributes = {
version: AppConstants.MOZ_APP_VERSION_DISPLAY,
bits: Services.appinfo.is64Bit ? 64 : 32,
version: AppConstants.BASE_BROWSER_VERSION,
firefoxVersion: AppConstants.MOZ_APP_VERSION_DISPLAY,
};
let version = Services.appinfo.version;
if (/a\d+$/.test(version)) {
versionId = "aboutDialog-version-nightly";
let buildID = Services.appinfo.appBuildID;
let year = buildID.slice(0, 4);
let month = buildID.slice(4, 6);
let day = buildID.slice(6, 8);
versionAttributes.isodate = `${year}-${month}-${day}`;
document.getElementById("experimental").hidden = false;
document.getElementById("communityDesc").hidden = true;
}
......
......@@ -7,6 +7,12 @@
<?xml-stylesheet href="chrome://global/skin/global.css" type="text/css"?>
<?xml-stylesheet href="chrome://browser/content/aboutDialog.css" type="text/css"?>
<?xml-stylesheet href="chrome://branding/content/aboutDialog.css" type="text/css"?>
<?xml-stylesheet href="chrome://browser/content/aboutDialogTor.css" type="text/css"?>
<!-- We need to include the localization DTDs until we migrate to Fluent -->
<!DOCTYPE window [
#include browser-doctype.inc
]>
<window xmlns:html="http://www.w3.org/1999/xhtml"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
......@@ -19,7 +25,7 @@
data-l10n-id="aboutDialog-title"
#endif
role="dialog"
aria-describedby="version distribution distributionId communityDesc contributeDesc trademark"
aria-describedby="version distribution distributionId projectDesc helpDesc trademark trademarkTor"
>
#ifdef XP_MACOSX
#include macWindow.inc.xhtml
......@@ -30,6 +36,7 @@
<linkset>
<html:link rel="localization" href="branding/brand.ftl"/>
<html:link rel="localization" href="browser/aboutDialog.ftl"/>
<html:link rel="localization" href="browser/base-browser.ftl"/>
</linkset>
<html:div id="aboutDialogContainer">
......@@ -127,24 +134,36 @@
<label is="text-link" useoriginprincipal="true" href="about:credits" data-l10n-name="community-exp-creditsLink"/>
</description>
</vbox>
<description class="text-blurb" id="communityDesc" data-l10n-id="community-2">
<label is="text-link" href="https://www.mozilla.org/?utm_source=firefox-browser&#38;utm_medium=firefox-desktop&#38;utm_campaign=about-dialog" data-l10n-name="community-mozillaLink"/>
<label is="text-link" useoriginprincipal="true" href="about:credits" data-l10n-name="community-creditsLink"/>
<!-- Keep communityDesc and contributeDesc to avoid JS errors trying to hide them -->
<description class="text-blurb" id="communityDesc" data-l10n-id="community-2" hidden="true"></description>
<description class="text-blurb" id="contributeDesc" data-l10n-id="helpus" hidden="true"></description>
<description class="text-blurb" id="projectDesc">
&project.start;
<label is="text-link" href="https://www.torproject.org/">
&project.tpoLink;
</label>&project.end;
</description>
<description class="text-blurb" id="contributeDesc" data-l10n-id="helpus">
<label is="text-link" href="https://donate.mozilla.org/?utm_source=firefox&#38;utm_medium=referral&#38;utm_campaign=firefox_about&#38;utm_content=firefox_about" data-l10n-name="helpus-donateLink"/>
<label is="text-link" href="https://www.mozilla.org/contribute/?utm_source=firefox-browser&#38;utm_medium=firefox-desktop&#38;utm_campaign=about-dialog" data-l10n-name="helpus-getInvolvedLink"/>
<description class="text-blurb" id="helpDesc">
&help.start;
<label is="text-link" href="https://donate.torproject.org/">
&help.donateLink;
</label>
&help.or;
<label is="text-link" href="https://community.torproject.org/">
&help.getInvolvedLink;
</label>&help.end;
</description>
</vbox>
</vbox>
</hbox>
<vbox id="bottomBox">
<hbox pack="center">
<label is="text-link" class="bottom-link" useoriginprincipal="true" href="about:license" data-l10n-id="bottomLinks-license"/>
<label is="text-link" class="bottom-link" useoriginprincipal="true" href="about:rights" data-l10n-id="bottomLinks-rights"/>
<label is="text-link" class="bottom-link" href="https://www.mozilla.org/privacy/?utm_source=firefox-browser&#38;utm_medium=firefox-desktop&#38;utm_campaign=about-dialog" data-l10n-id="bottomLinks-privacy"/>
<hbox id="newBottom" pack="center" position="1">
<label is="text-link" class="bottom-link" href="https://support.torproject.org/">&bottomLinks.questions;</label>
<label is="text-link" class="bottom-link" href="https://community.torproject.org/relay/">&bottomLinks.grow;</label>
<label is="text-link" class="bottom-link" useoriginprincipal="true" href="about:license">&bottomLinks.license;</label>
</hbox>
<description id="trademark" data-l10n-id="trademarkInfo"></description>
<description id="trademarkTor">&tor.TrademarkStatement;</description>
</vbox>
</html:div>
......
#leftBox {
background-image: url('chrome://branding/content/icon256.png');
background-position: right top;
background-size: 180px;
}
#rightBox {
background-size: auto;
padding-top: 32px;
}
#contributeDesc {
display: none;
}
#communityDesc {
display: none;
}
#trademark {
display: none;
}
#trademarkTor {
font-size: xx-small;
text-align: center;
color: #999999;
margin-top: 10px;
margin-bottom: 10px;
}
#bottomBox > hbox:not(#newBottom) {
display: none;
}
/*
* Copyright (c) 2019, The Tor Project, Inc.
* See LICENSE for licensing information.
*
* vim: set sw=2 sts=2 ts=8 et syntax=css:
*/
:root {
--abouttor-text-color: white;
--abouttor-bg-toron-color: #420C5D;
}
body {
font-family: Helvetica, Arial, sans-serif;
color: var(--abouttor-text-color);
background-color: var(--abouttor-bg-toron-color);
margin-block: 40px;
margin-inline: 50px;
display: grid;
grid-template-columns: auto auto;
align-items: baseline;
gap: 40px 50px;
}
body > *:not([hidden]) {
display: contents;
}
.label-column {
grid-column: 1;
}
.content {
grid-column: 2;
font-family: monospace;
line-height: 1.4;
}
.label-column, .content {
margin: 0;
padding: 0;
font-size: 1rem;
font-weight: normal;
}
a {
color: inherit;
}
.no-line-break {
white-space: nowrap;
}
ul {
padding-inline: 1em 0;
}
h3, h4 {
font-size: 1.1rem;
font-weight: bold;
}
h3.build-system-heading {
font-size: 1.5rem;
font-weight: normal;
margin-block-start: 3em;
}
// Copyright (c) 2020, The Tor Project, Inc.
// See LICENSE for licensing information.
//
// vim: set sw=2 sts=2 ts=8 et syntax=javascript:
/* eslint-env mozilla/remote-page */
/**
* An object representing a bullet point in the release notes.
*
* typedef {Object} ReleaseBullet
* @property {string} text - The text for this bullet point.
* @property {?Array<ReleaseBullet>} children - A sub-list of bullet points.
*/
/**
* Fill an element with the given list of release bullet points.
*
* @param {Element} container - The element to fill with bullet points.
* @param {Array<ReleaseBullet>} bulletPoints - The list of bullet points.
* @param {string} [childTag="h3"] - The element tag name to use for direct
* children. Initially, the children are h3 sub-headings.
*/
function fillReleaseNotes(container, bulletPoints, childTag = "h3") {
for (const { text, children } of bulletPoints) {
const childEl = document.createElement(childTag);
// Keep dashes like "[tor-browser]" on the same line by nowrapping the word.
for (const [index, part] of text.split(/(\S+-\S+)/).entries()) {
if (!part) {
continue;
}
const span = document.createElement("span");
span.textContent = part;
span.classList.toggle("no-line-break", index % 2);
childEl.appendChild(span);
}
container.appendChild(childEl);
if (children) {
if (childTag == "h3" && text.toLowerCase() === "build system") {
// Special case: treat the "Build System" heading's children as
// sub-headings.
childEl.classList.add("build-system-heading");
fillReleaseNotes(container, children, "h4");
} else {
const listEl = document.createElement("ul");
fillReleaseNotes(listEl, children, "li");
if (childTag == "li") {
// Insert within the "li" element.
childEl.appendChild(listEl);
} else {
container.appendChild(listEl);
}
}
}
}
}
/**
* Set the content for the specified container, or hide it if we have no
* content.
*
* @template C
* @param {string} containerId - The id for the container.
* @param {?C} content - The content for this container, or a falsey value if
* the container has no content.
* @param {function(contentEl: Elemenet, content: C)} [fillContent] - A function
* to fill the ".content" contentEl with the given 'content'. If unspecified,
* the 'content' will become the contentEl's textContent.
*/
function setContent(containerId, content, fillContent) {
const container = document.getElementById(containerId);
if (!content) {
container.hidden = true;
return;
}
const contentEl = container.querySelector(".content");
// Release notes are only in English.
contentEl.setAttribute("lang", "en-US");
contentEl.setAttribute("dir", "ltr");
if (fillContent) {
fillContent(contentEl, content);
} else {
contentEl.textContent = content;
}
}
/**
* Callback when we receive the update details.
*
* @param {Object} aData - The update details.
* @param {?string} aData.version - The update version.
* @param {?string} aData.releaseDate - The release date.
* @param {?string} aData.moreInfoURL - A URL for more info.
* @param {?Array<ReleaseBullet>} aData.releaseNotes - Release notes as bullet
* points.
*/
function onUpdate(aData) {
setContent("version-row", aData.version);
setContent("releasedate-row", aData.releaseDate);
setContent("releasenotes", aData.releaseNotes, fillReleaseNotes);
if (aData.moreInfoURL) {
document.getElementById("infolink").setAttribute("href", aData.moreInfoURL);
} else {
document.getElementById("fullinfo").hidden = true;
}
}
RPMSendQuery("FetchUpdateData").then(onUpdate);
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html [
<!ENTITY % htmlDTD
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"DTD/xhtml1-strict.dtd">
%htmlDTD;
<!ENTITY % tbUpdateDTD SYSTEM "chrome://browser/locale/aboutTBUpdate.dtd">
%tbUpdateDTD;
]>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Security-Policy" content="default-src chrome:; object-src 'none'" />
<title>&aboutTBUpdate.changelogTitle;</title>
<link rel="stylesheet" type="text/css"
href="chrome://browser/content/abouttbupdate/aboutTBUpdate.css"/>
<script src="chrome://browser/content/abouttbupdate/aboutTBUpdate.js"
type="text/javascript"/>
<!-- Hack: we are not using Fluent translations in this page (yet), but we use
- this tag so it sets up the page automatically for us. -->
<link rel="localization" href="branding/brand.ftl" />
</head>
<body>
<!-- NOTE: We don't use the <dl>, <dt> and <dd> elements to form name-value
- pairs because this semantics is relatively new, whilst firefox
- currently still maps these to the more limited "definitionlist", "term"
- and "definition" roles. -->
<div id="version-row">
<span class="label-column">&aboutTBUpdate.version;</span>
<span class="content"></span>
</div>
<div id="releasedate-row">
<span class="label-column">&aboutTBUpdate.releaseDate;</span>
<span class="content"></span>
</div>
<div id="fullinfo">
<p class="content">
&aboutTBUpdate.linkPrefix;<a id="infolink">&aboutTBUpdate.linkLabel;</a>&aboutTBUpdate.linkSuffix;
</p>
</div>
<section id="releasenotes">
<h2 class="label-column">&aboutTBUpdate.releaseNotes;</h2>
<div class="content"></div>
</section>
</body>
</html>
......@@ -55,6 +55,15 @@
key="key_privatebrowsing"
command="Tools:PrivateBrowsing"/>
<toolbarseparator/>
<toolbarbutton id="appMenu-new-identity"
class="subviewbutton"
key="new-identity-key"/>
<toolbarbutton id="appMenuNewCircuit"
class="subviewbutton"
key="new-circuit-key"
label="&torbutton.context_menu.new_circuit_sentence_case;"
oncommand="TorDomainIsolator.newCircuitForBrowser(gBrowser);"/>
<toolbarseparator/>
<toolbarbutton id="appMenu-bookmarks-button"
class="subviewbutton subviewbutton-nav"
data-l10n-id="library-bookmarks-menu"
......@@ -181,7 +190,8 @@
<toolbarbutton id="appMenu-restoreSession"
data-l10n-id="appmenu-restore-session"
class="subviewbutton"
command="Browser:RestoreLastSession"/>
command="Browser:RestoreLastSession"
hidden="true"/>
<toolbarseparator/>
<toolbarbutton id="appMenuClearRecentHistory"
data-l10n-id="appmenu-clear-history"
......
......@@ -26,6 +26,9 @@ XPCOMUtils.defineLazyGetter(lazy, "l10n", function () {
);
});
const HIDE_NO_SCRIPT_PREF = "extensions.hideNoScript";
const HIDE_UNIFIED_WHEN_EMPTY_PREF = "extensions.hideUnifiedWhenEmpty";
/**
* Mapping of error code -> [error-id, local-error-id]
*
......@@ -1186,6 +1189,18 @@ var gUnifiedExtensions = {
gNavToolbox.addEventListener("customizationstarting", this);
CustomizableUI.addListener(this);
// Listen out for changes in extensions.hideNoScript and
// extension.hideUnifiedWhenEmpty, which can effect the visibility of the
// unified-extensions-button.
// See tor-browser#41581.
this._hideNoScriptObserver = () => this._updateVisibility();
Services.prefs.addObserver(HIDE_NO_SCRIPT_PREF, this._hideNoScriptObserver);
Services.prefs.addObserver(
HIDE_UNIFIED_WHEN_EMPTY_PREF,
this._hideNoScriptObserver
);
this._updateVisibility();
this._initialized = true;
},
......@@ -1201,6 +1216,15 @@ var gUnifiedExtensions = {
gNavToolbox.removeEventListener("customizationstarting", this);
CustomizableUI.removeListener(this);
Services.prefs.removeObserver(
HIDE_NO_SCRIPT_PREF,
this._hideNoScriptObserver
);
Services.prefs.removeObserver(
HIDE_UNIFIED_WHEN_EMPTY_PREF,
this._hideNoScriptObserver
);
},
onLocationChange(browser, webProgress, _request, _uri, flags) {
......@@ -1278,6 +1302,15 @@ var gUnifiedExtensions = {
return false;
}
// When an extensions is about to be removed, it may still appear in
// getActiveExtensions.
// This is needed for hasExtensionsInPanel, when called through
// onWidgetDestroy when an extension is being removed.
// See tor-browser#41581.
if (extension.hasShutdown) {
return false;
}
// Ignore hidden and extensions that cannot access the current window
// (because of PB mode when we are in a private window), since users
// cannot do anything with those extensions anyway.
......@@ -1292,6 +1325,20 @@ var gUnifiedExtensions = {
return policies;
},
/**
* Potentially hide the unified-extensions-button if it would be empty.
*/
// See tor-browser#41581.
// The behaviour overlaps with a proposal in mozilla Bug 1778684, which has
// not been implemented, or had much recent activity as of 5th October 2023.
_updateVisibility() {
this.button.classList.toggle(
"hide-empty",
Services.prefs.getBoolPref(HIDE_UNIFIED_WHEN_EMPTY_PREF, true) &&
!this.hasExtensionsInPanel()
);
},
/**
* Returns true when there are active extensions listed/shown in the unified
* extensions panel, and false otherwise (e.g. when extensions are pinned in
......@@ -1300,7 +1347,13 @@ var gUnifiedExtensions = {
* @returns {boolean} Whether there are extensions listed in the panel.
*/
hasExtensionsInPanel() {
const policies = this.getActivePolicies();
let policies = this.getActivePolicies();
// If the NoScript button is hidden, we won't count it towards the list of
// extensions in the panel.
// See tor-browser#41581.
if (Services.prefs.getBoolPref(HIDE_NO_SCRIPT_PREF, true)) {
policies = policies.filter(policy => !policy.extension?.isNoScript);
}
return !!policies
.map(policy => this.browserActionFor(policy)?.widget)
......@@ -1795,7 +1848,17 @@ var gUnifiedExtensions = {
}
},
onWidgetRemoved() {
this._updateVisibility();
},
onWidgetDestroyed() {
this._updateVisibility();
},
onWidgetAdded(aWidgetId, aArea, aPosition) {
this._updateVisibility();
// When we pin a widget to the toolbar from a narrow window, the widget
// will be overflowed directly. In this case, we do not want to change the
// class name since it is going to be changed by `onWidgetOverflow()`
......@@ -1811,6 +1874,8 @@ var gUnifiedExtensions = {
},
onWidgetOverflow(aNode, aContainer) {
this._updateVisibility();
// We register a CUI listener for each window so we make sure that we
// handle the event for the right window here.
if (window !== aNode.ownerGlobal) {
......@@ -1821,6 +1886,8 @@ var gUnifiedExtensions = {
},
onWidgetUnderflow(aNode, aContainer) {
this._updateVisibility();
// We register a CUI listener for each window so we make sure that we
// handle the event for the right window here.
if (window !== aNode.ownerGlobal) {
......
......@@ -219,7 +219,7 @@
#ifdef CONTEXT_COPY_IMAGE_CONTENTS
<menuitem id="context-copyimage-contents"
data-l10n-id="main-context-menu-image-copy"
oncommand="goDoCommand('cmd_copyImage');"/>
oncommand="goDoCommand('cmd_copyImageContents');"/>
#endif
<menuitem id="context-copyimage"
data-l10n-id="main-context-menu-image-copy-link"
......
<!ENTITY % brandDTD SYSTEM "chrome://branding/locale/brand.dtd" >
%brandDTD;
<!ENTITY % torbuttonDTD SYSTEM "chrome://torbutton/locale/torbutton.dtd">
%torbuttonDTD;
<!ENTITY % aboutDialogDTD SYSTEM "chrome://torbutton/locale/aboutDialog.dtd">
%aboutDialogDTD;