lists.torproject.org
Sign In Sign Up
Manage this list Sign In Sign Up

Keyboard Shortcuts

Thread View

  • j: Next unread message
  • k: Previous unread message
  • j a: Jump to all threads
  • j l: Jump to MailingList overview

tbb-commits

Thread Start a new thread
Threads by month
  • ----- 2026 -----
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2025 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2024 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2023 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2022 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2021 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2020 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2019 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2018 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2017 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2016 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2015 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2014 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
tbb-commits@lists.torproject.org

  • 1 participants
  • 20971 discussions
[Git][tpo/applications/tor-browser][tor-browser-115.3.1esr-13.0-1] fixup! Bug 31286: Implementation of bridge, proxy, and firewall settings in...
by Pier Angelo Vendrame (@pierov) 10 Oct '23

10 Oct '23
Pier Angelo Vendrame pushed to branch tor-browser-115.3.1esr-13.0-1 at The Tor Project / Applications / Tor Browser Commits: e7f56e07 by Pier Angelo Vendrame at 2023-10-10T14:50:51+00:00 fixup! Bug 31286: Implementation of bridge, proxy, and firewall settings in about:preferences#connection Bug 41976: Fix the padding of the collapsed bridge cards. - - - - - 1 changed file: - browser/components/torpreferences/content/torPreferences.css Changes: ===================================== browser/components/torpreferences/content/torPreferences.css ===================================== @@ -298,13 +298,13 @@ 'bridge-qr bridge-share bridge-share' 'bridge-qr bridge-address bridge-address' 'bridge-qr bridge-learn-more bridge-copy'; - padding-top: 12px; visibility: hidden; } .expanded .torPreferences-bridgeCard-grid, .currently-connected .torPreferences-bridgeCard-grid, .single-card .torPreferences-bridgeCard-grid { + padding-top: 12px; visibility: visible; } View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/e7f56e0… -- View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/e7f56e0… You're receiving this email because of your account on gitlab.torproject.org.
1 0
0 0
[Git][tpo/applications/mullvad-browser][mullvad-browser-115.3.1esr-13.0-1] fixup! Bug 40925: Implemented the Security Level component
by Pier Angelo Vendrame (@pierov) 10 Oct '23

10 Oct '23
Pier Angelo Vendrame pushed to branch mullvad-browser-115.3.1esr-13.0-1 at The Tor Project / Applications / Mullvad Browser Commits: 70edc71a by Henry Wilkes at 2023-10-10T12:46:04+02:00 fixup! Bug 40925: Implemented the Security Level component Bug 41973: re-align popup panel to the anchor's corner edge. - - - - - 1 changed file: - browser/components/securitylevel/content/securityLevel.js Changes: ===================================== browser/components/securitylevel/content/securityLevel.js ===================================== @@ -146,7 +146,7 @@ var SecurityLevelButton = { }); } - panel.openPopup(anchorNode, "bottomcenter topright", 0, 0, false); + panel.openPopup(anchorNode, "bottomright topright", 0, 0, false); }, init() { View it on GitLab: https://gitlab.torproject.org/tpo/applications/mullvad-browser/-/commit/70e… -- View it on GitLab: https://gitlab.torproject.org/tpo/applications/mullvad-browser/-/commit/70e… You're receiving this email because of your account on gitlab.torproject.org.
1 0
0 0
[Git][tpo/applications/tor-browser][base-browser-115.3.1esr-13.0-1] fixup! Bug 40925: Implemented the Security Level component
by Pier Angelo Vendrame (@pierov) 10 Oct '23

10 Oct '23
Pier Angelo Vendrame pushed to branch base-browser-115.3.1esr-13.0-1 at The Tor Project / Applications / Tor Browser Commits: 45e4c1dd by Henry Wilkes at 2023-10-10T12:45:38+02:00 fixup! Bug 40925: Implemented the Security Level component Bug 41973: re-align popup panel to the anchor's corner edge. - - - - - 1 changed file: - browser/components/securitylevel/content/securityLevel.js Changes: ===================================== browser/components/securitylevel/content/securityLevel.js ===================================== @@ -146,7 +146,7 @@ var SecurityLevelButton = { }); } - panel.openPopup(anchorNode, "bottomcenter topright", 0, 0, false); + panel.openPopup(anchorNode, "bottomright topright", 0, 0, false); }, init() { View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/45e4c1d… -- View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/45e4c1d… You're receiving this email because of your account on gitlab.torproject.org.
1 0
0 0
[Git][tpo/applications/tor-browser][tor-browser-115.3.1esr-13.0-1] fixup! Bug 40925: Implemented the Security Level component
by Pier Angelo Vendrame (@pierov) 10 Oct '23

10 Oct '23
Pier Angelo Vendrame pushed to branch tor-browser-115.3.1esr-13.0-1 at The Tor Project / Applications / Tor Browser Commits: 4605a45d by Henry Wilkes at 2023-10-10T10:44:08+00:00 fixup! Bug 40925: Implemented the Security Level component Bug 41973: re-align popup panel to the anchor's corner edge. - - - - - 1 changed file: - browser/components/securitylevel/content/securityLevel.js Changes: ===================================== browser/components/securitylevel/content/securityLevel.js ===================================== @@ -146,7 +146,7 @@ var SecurityLevelButton = { }); } - panel.openPopup(anchorNode, "bottomcenter topright", 0, 0, false); + panel.openPopup(anchorNode, "bottomright topright", 0, 0, false); }, init() { View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/4605a45… -- View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/4605a45… You're receiving this email because of your account on gitlab.torproject.org.
1 0
0 0
[Git][tpo/applications/tor-browser][tor-browser-115.3.1esr-13.0-1] fixup! Bug 41600: Add a tor circuit display panel.
by Pier Angelo Vendrame (@pierov) 10 Oct '23

10 Oct '23
Pier Angelo Vendrame pushed to branch tor-browser-115.3.1esr-13.0-1 at The Tor Project / Applications / Tor Browser Commits: ed56d740 by Henry Wilkes at 2023-10-10T11:27:22+01:00 fixup! Bug 41600: Add a tor circuit display panel. Bug 41973: re-align popup panel to the anchor's corner edge. - - - - - 1 changed file: - browser/components/torcircuit/content/torCircuitPanel.js Changes: ===================================== browser/components/torcircuit/content/torCircuitPanel.js ===================================== @@ -221,7 +221,7 @@ var gTorCircuitPanel = { * This should only be called if the toolbar button is visible. */ show() { - this.panel.openPopup(this.toolbarButton, "bottomcenter topleft", 0, 0); + this.panel.openPopup(this.toolbarButton, "bottomleft topleft", 0, 0); }, /** View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/ed56d74… -- View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/ed56d74… You're receiving this email because of your account on gitlab.torproject.org.
1 0
0 0
[Git][tpo/applications/tor-browser][tor-browser-115.3.1esr-13.0-1] fixup! Bug 31286: Implementation of bridge, proxy, and firewall settings in...
by Pier Angelo Vendrame (@pierov) 10 Oct '23

10 Oct '23
Pier Angelo Vendrame pushed to branch tor-browser-115.3.1esr-13.0-1 at The Tor Project / Applications / Tor Browser Commits: f14c6b11 by Pier Angelo Vendrame at 2023-10-10T08:33:38+00:00 fixup! Bug 31286: Implementation of bridge, proxy, and firewall settings in about:preferences#connection Bug 41912: Hide &quot;Use Current Bridges&quot; when we do not have any bridge strings. - - - - - 2 changed files: - browser/components/torpreferences/content/connectionPane.js - browser/components/torpreferences/content/connectionPane.xhtml Changes: ===================================== browser/components/torpreferences/content/connectionPane.js ===================================== @@ -99,6 +99,7 @@ const gConnectionPane = (function () { currentHeader: "#torPreferences-currentBridges-header", currentDescription: "#torPreferences-currentBridges-description", currentDescriptionText: "#torPreferences-currentBridges-descriptionText", + controls: "#torPreferences-currentBridges-controls", switch: "#torPreferences-currentBridges-switch", cards: "#torPreferences-currentBridges-cards", cardTemplate: "#torPreferences-bridgeCard-template", @@ -391,6 +392,7 @@ const gConnectionPane = (function () { selectors.bridges.currentHeader ); bridgeHeader.textContent = TorStrings.settings.bridgeCurrent; + const bridgeControls = prefpane.querySelector(selectors.bridges.controls); const bridgeSwitch = prefpane.querySelector(selectors.bridges.switch); bridgeSwitch.setAttribute("label", TorStrings.settings.allBridgesEnabled); bridgeSwitch.addEventListener("toggle", () => { @@ -629,18 +631,17 @@ const gConnectionPane = (function () { const newStrings = new Set(TorSettings.bridges.bridge_strings); const numBridges = newStrings.size; - if (!newStrings.size) { - bridgeHeader.hidden = true; - bridgeDescription.hidden = true; - bridgeCards.hidden = true; + const noBridges = !numBridges; + bridgeHeader.hidden = noBridges; + bridgeDescription.hidden = noBridges; + bridgeControls.hidden = noBridges; + bridgeCards.hidden = noBridges; + if (noBridges) { showAll.hidden = true; removeAll.hidden = true; bridgeCards.textContent = ""; return; } - bridgeHeader.hidden = false; - bridgeDescription.hidden = false; - bridgeCards.hidden = false; // Changing the pressed property on moz-toggle should not trigger its // "toggle" event. bridgeSwitch.pressed = TorSettings.bridges.enabled; @@ -757,7 +758,7 @@ const gConnectionPane = (function () { bridge = provider.currentBridge; } catch (e) { console.warn("Could not get current bridge", e); - } + } if (bridge?.fingerprint !== this._currentBridgeId) { this._currentBridgeId = bridge?.fingerprint ?? null; this._updateConnectedBridges(); ===================================== browser/components/torpreferences/content/connectionPane.xhtml ===================================== @@ -107,7 +107,7 @@ <description flex="1" id="torPreferences-currentBridges-description"> <html:span id="torPreferences-currentBridges-descriptionText" /> </description> - <hbox align="center"> + <hbox align="center" id="torPreferences-currentBridges-controls"> <html:moz-toggle id="torPreferences-currentBridges-switch" label-align-after="" View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/f14c6b1… -- View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/f14c6b1… You're receiving this email because of your account on gitlab.torproject.org.
1 0
0 0
[Git][tpo/applications/mullvad-browser][mullvad-browser-115.3.1esr-13.0-1] fixup! Bug 32308: use direct browser sizing for letterboxing. Bug 30556: align...
by ma1 (@ma1) 09 Oct '23

09 Oct '23
ma1 pushed to branch mullvad-browser-115.3.1esr-13.0-1 at The Tor Project / Applications / Mullvad Browser Commits: 453cd063 by hackademix at 2023-10-09T20:49:46+02:00 fixup! Bug 32308: use direct browser sizing for letterboxing. Bug 30556: align letterboxing with 200x100 new win width stepping Bug 41259: Do not interfere with devtools responsive mode sizing. - - - - - 2 changed files: - browser/base/content/browser.css - toolkit/components/resistfingerprinting/RFPHelper.sys.mjs Changes: ===================================== browser/base/content/browser.css ===================================== @@ -140,7 +140,7 @@ body { Never modify the following selector without synchronizing LETTERBOX_CSS_SELECTOR in RFPHelper.jsm! **/ -.letterboxing .browserStack:not(.exclude-letterboxing) > browser { +.letterboxing .browserContainer:not(.responsive-mode) > .browserStack:not(.exclude-letterboxing) > browser { /* width & height to be dynamically set by RFPHelper.jsm */ outline: 1px solid var(--chrome-content-separator-color); } @@ -149,7 +149,7 @@ body { outline: initial; } -:root:not([inDOMFullscreen]) .letterboxing.letterboxing-ready .browserStack:not(.exclude-letterboxing) { +:root:not([inDOMFullscreen]) .letterboxing.letterboxing-ready .browserContainer:not(.responsive-mode) > .browserStack:not(.exclude-letterboxing) { place-content: start center; } ===================================== toolkit/components/resistfingerprinting/RFPHelper.sys.mjs ===================================== @@ -437,7 +437,7 @@ class _RFPHelper { // preemptively in order to beat race conditions on tab/window creation const LETTERBOX_CSS_URL = "chrome://browser/content/browser.css"; const LETTERBOX_CSS_SELECTOR = - ".letterboxing .browserStack:not(.exclude-letterboxing) > browser"; + ".letterboxing .browserContainer:not(.responsive-mode) > .browserStack:not(.exclude-letterboxing) > browser"; for (let ss of document.styleSheets) { if (ss.href !== LETTERBOX_CSS_URL) { continue; @@ -557,8 +557,8 @@ class _RFPHelper { const roundDimensions = (aWidth, aHeight) => { const r = (aWidth, aHeight) => ({ - width: `${aWidth}px`, - height: `${aHeight}px`, + width: `var(--rdm-width, ${aWidth}px)`, + height: `var(--rdm-height, ${aHeight}px)`, }); let result; View it on GitLab: https://gitlab.torproject.org/tpo/applications/mullvad-browser/-/commit/453… -- View it on GitLab: https://gitlab.torproject.org/tpo/applications/mullvad-browser/-/commit/453… You're receiving this email because of your account on gitlab.torproject.org.
1 0
0 0
[Git][tpo/applications/tor-browser][base-browser-115.3.1esr-13.0-1] fixup! Bug 32308: use direct browser sizing for letterboxing. Bug 30556: align...
by ma1 (@ma1) 09 Oct '23

09 Oct '23
ma1 pushed to branch base-browser-115.3.1esr-13.0-1 at The Tor Project / Applications / Tor Browser Commits: 4ff109fa by hackademix at 2023-10-09T20:47:34+02:00 fixup! Bug 32308: use direct browser sizing for letterboxing. Bug 30556: align letterboxing with 200x100 new win width stepping Bug 41259: Do not interfere with devtools responsive mode sizing. - - - - - 2 changed files: - browser/base/content/browser.css - toolkit/components/resistfingerprinting/RFPHelper.sys.mjs Changes: ===================================== browser/base/content/browser.css ===================================== @@ -140,7 +140,7 @@ body { Never modify the following selector without synchronizing LETTERBOX_CSS_SELECTOR in RFPHelper.jsm! **/ -.letterboxing .browserStack:not(.exclude-letterboxing) > browser { +.letterboxing .browserContainer:not(.responsive-mode) > .browserStack:not(.exclude-letterboxing) > browser { /* width & height to be dynamically set by RFPHelper.jsm */ outline: 1px solid var(--chrome-content-separator-color); } @@ -149,7 +149,7 @@ body { outline: initial; } -:root:not([inDOMFullscreen]) .letterboxing.letterboxing-ready .browserStack:not(.exclude-letterboxing) { +:root:not([inDOMFullscreen]) .letterboxing.letterboxing-ready .browserContainer:not(.responsive-mode) > .browserStack:not(.exclude-letterboxing) { place-content: start center; } ===================================== toolkit/components/resistfingerprinting/RFPHelper.sys.mjs ===================================== @@ -437,7 +437,7 @@ class _RFPHelper { // preemptively in order to beat race conditions on tab/window creation const LETTERBOX_CSS_URL = "chrome://browser/content/browser.css"; const LETTERBOX_CSS_SELECTOR = - ".letterboxing .browserStack:not(.exclude-letterboxing) > browser"; + ".letterboxing .browserContainer:not(.responsive-mode) > .browserStack:not(.exclude-letterboxing) > browser"; for (let ss of document.styleSheets) { if (ss.href !== LETTERBOX_CSS_URL) { continue; @@ -557,8 +557,8 @@ class _RFPHelper { const roundDimensions = (aWidth, aHeight) => { const r = (aWidth, aHeight) => ({ - width: `${aWidth}px`, - height: `${aHeight}px`, + width: `var(--rdm-width, ${aWidth}px)`, + height: `var(--rdm-height, ${aHeight}px)`, }); let result; View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/4ff109f… -- View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/4ff109f… You're receiving this email because of your account on gitlab.torproject.org.
1 0
0 0
[Git][tpo/applications/tor-browser][tor-browser-115.3.1esr-13.0-1] fixup! Bug 32308: use direct browser sizing for letterboxing. Bug 30556: align...
by ma1 (@ma1) 09 Oct '23

09 Oct '23
ma1 pushed to branch tor-browser-115.3.1esr-13.0-1 at The Tor Project / Applications / Tor Browser Commits: 10f40c2f by hackademix at 2023-10-09T19:54:52+02:00 fixup! Bug 32308: use direct browser sizing for letterboxing. Bug 30556: align letterboxing with 200x100 new win width stepping Bug 41259: Do not interfere with devtools responsive mode sizing. - - - - - 2 changed files: - browser/base/content/browser.css - toolkit/components/resistfingerprinting/RFPHelper.sys.mjs Changes: ===================================== browser/base/content/browser.css ===================================== @@ -140,7 +140,7 @@ body { Never modify the following selector without synchronizing LETTERBOX_CSS_SELECTOR in RFPHelper.jsm! **/ -.letterboxing .browserStack:not(.exclude-letterboxing) > browser { +.letterboxing .browserContainer:not(.responsive-mode) > .browserStack:not(.exclude-letterboxing) > browser { /* width & height to be dynamically set by RFPHelper.jsm */ outline: 1px solid var(--chrome-content-separator-color); } @@ -149,7 +149,7 @@ body { outline: initial; } -:root:not([inDOMFullscreen]) .letterboxing.letterboxing-ready .browserStack:not(.exclude-letterboxing) { +:root:not([inDOMFullscreen]) .letterboxing.letterboxing-ready .browserContainer:not(.responsive-mode) > .browserStack:not(.exclude-letterboxing) { place-content: start center; } ===================================== toolkit/components/resistfingerprinting/RFPHelper.sys.mjs ===================================== @@ -437,7 +437,7 @@ class _RFPHelper { // preemptively in order to beat race conditions on tab/window creation const LETTERBOX_CSS_URL = "chrome://browser/content/browser.css"; const LETTERBOX_CSS_SELECTOR = - ".letterboxing .browserStack:not(.exclude-letterboxing) > browser"; + ".letterboxing .browserContainer:not(.responsive-mode) > .browserStack:not(.exclude-letterboxing) > browser"; for (let ss of document.styleSheets) { if (ss.href !== LETTERBOX_CSS_URL) { continue; @@ -557,8 +557,8 @@ class _RFPHelper { const roundDimensions = (aWidth, aHeight) => { const r = (aWidth, aHeight) => ({ - width: `${aWidth}px`, - height: `${aHeight}px`, + width: `var(--rdm-width, ${aWidth}px)`, + height: `var(--rdm-height, ${aHeight}px)`, }); let result; View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/10f40c2… -- View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/10f40c2… You're receiving this email because of your account on gitlab.torproject.org.
1 0
0 0
[Git][tpo/applications/mullvad-browser] Pushed new tag mullvad-browser-115.3.1esr-13.0-1-build2
by Pier Angelo Vendrame (@pierov) 09 Oct '23

09 Oct '23
Pier Angelo Vendrame pushed new tag mullvad-browser-115.3.1esr-13.0-1-build2 at The Tor Project / Applications / Mullvad Browser -- View it on GitLab: https://gitlab.torproject.org/tpo/applications/mullvad-browser/-/tree/mullv… You're receiving this email because of your account on gitlab.torproject.org.
1 0
0 0
[Git][tpo/applications/tor-browser][base-browser-115.3.1esr-13.0-1] 6 commits: fixup! Bug 41736: Customize toolbar for base-browser.
by Pier Angelo Vendrame (@pierov) 05 Oct '23

05 Oct '23
Pier Angelo Vendrame pushed to branch base-browser-115.3.1esr-13.0-1 at The Tor Project / Applications / Tor Browser Commits: 88684e4d by Henry Wilkes at 2023-10-05T22:40:35+02:00 fixup! Bug 41736: Customize toolbar for base-browser. Bug 41736: Stop placing the NoScript button in the palette, and let it go to the toolbar by default when shown. - - - - - 7d1513ca by Henry Wilkes at 2023-10-05T22:40:37+02:00 fixup! Bug 41598: Prevent NoScript from being removed/disabled. Bug 41736: Add a isNoScript property to Extension class. - - - - - 4bf92938 by Henry Wilkes at 2023-10-05T22:40:37+02:00 Bug 41736: Hide NoScript extension&#39;s toolbar button by default. This hides it from both the toolbar and the unified extensions panel. We also hide the unified-extension-button if the panel would be empty: not including the NoScript button when it is hidden. As a result, this will be hidden by default until a user installs another extension (or shows the NoScript button and unpins it). - - - - - e5331a5f by Henry Wilkes at 2023-10-05T22:40:37+02:00 fixup! Firefox preference overrides. Bug 41736: Hide NoScript extension by default. We also hide the unified-extension-button if it would be empty. - - - - - 2b9948b2 by Henry Wilkes at 2023-10-05T22:40:38+02:00 fixup! Bug 41736: Customize toolbar for base-browser. Bug 41581: Keep NoScript button in the toolbar (but hidden) by default. Also includes some migration. - - - - - f0f9f20e by Henry Wilkes at 2023-10-05T22:40:38+02:00 fixup! Base Browser strings Bug 41581: Add strings for changing the visibility of the NoScript toolbar button. - - - - - 9 changed files: - browser/app/profile/001-base-profile.js - browser/base/content/browser-addons.js - browser/components/customizableui/CustomizableUI.sys.mjs - browser/components/extensions/parent/ext-browserAction.js - browser/locales/en-US/browser/base-browser.ftl - browser/themes/shared/addons/unified-extensions.css - toolkit/components/extensions/Extension.sys.mjs - toolkit/mozapps/extensions/content/aboutaddons.html - toolkit/mozapps/extensions/content/aboutaddons.js Changes: ===================================== browser/app/profile/001-base-profile.js ===================================== @@ -220,6 +220,10 @@ pref("privacy.annotate_channels.strict_list.enabled", false); // Disable the Pocket extension (Bug #18886 and #31602) pref("extensions.pocket.enabled", false); +// Custom extensions preferences tor-browser#41581 +pref("extensions.hideNoScript", true); +pref("extensions.hideUnifiedWhenEmpty", true); + // Disable activity stream/"Recommended by Pocket" in about:home (Bug #41029) pref("browser.newtabpage.activity-stream.discoverystream.enabled", false); pref("browser.newtabpage.activity-stream.feeds.section.topstories", false); ===================================== browser/base/content/browser-addons.js ===================================== @@ -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) { ===================================== browser/components/customizableui/CustomizableUI.sys.mjs ===================================== @@ -65,7 +65,8 @@ var kVersion = 19; /** * The current version for base browser. */ -var kVersionBaseBrowser = 1; +var kVersionBaseBrowser = 2; +const NoScriptId = "_73a6fe31-595d-460b-a920-fcc0f8843232_-browser-action"; /** * Buttons removed from built-ins by version they were removed. kVersion must be @@ -850,6 +851,57 @@ var CustomizableUIInternal = { delete gSavedState.placements["PanelUI-contents"]; delete gSavedState.placements["addon-bar"]; } + + if (currentVersion < 2) { + // Matches against kVersion 19, i.e. when the unified-extensions-button + // was introduced and extensions were moved from the palette to + // AREA_ADDONS. + // For base browser, we want the NoScript addon to be moved from the + // default palette to AREA_NAVBAR, so that if it becomes shown through the + // preference extensions.hideNoScript it will appear in the toolbar. + // If the NoScript addon is already in AREA_NAVBAR, we instead flip the + // extensions.hideNoScript preference so that it remains visible. + // See tor-browser#41581. + const navbarPlacements = + gSavedState.placements[CustomizableUI.AREA_NAVBAR]; + if (navbarPlacements) { + let noScriptVisible = false; + for (const [area, placements] of Object.entries( + gSavedState.placements + )) { + const index = placements.indexOf(NoScriptId); + if (index === -1) { + continue; + } + if (area === CustomizableUI.AREA_ADDONS) { + // Has been placed in the ADDONS area. + // Most likely, this is an alpha or nightly user who received the + // firefox update in a run before this one. In this case, we want to + // match the same behaviour as a stable user: hide the button and + // move it to the NAVBAR instead. + placements.splice(index, 1); + } else { + // It is in an area other than the ADDON (and not in the palette). + noScriptVisible = true; + } + } + if (noScriptVisible) { + // Keep the button where it is and make sure it is visible. + Services.prefs.setBoolPref("extensions.hideNoScript", false); + } else { + // Should appear just before unified-extensions-button, which is + // currently not part of the default placements. + const placeIndex = navbarPlacements.indexOf( + "unified-extensions-button" + ); + if (placeIndex === -1) { + navbarPlacements.push(NoScriptId); + } else { + navbarPlacements.splice(placeIndex, 0, NoScriptId); + } + } + } + } }, _placeNewDefaultWidgetsInArea(aArea) { @@ -3409,7 +3461,17 @@ var CustomizableUIInternal = { CustomizableUI.isWebExtensionWidget(widgetId) && !oldAddonPlacements.includes(widgetId) ) { - this.addWidgetToArea(widgetId, CustomizableUI.AREA_ADDONS); + // When resetting, NoScript goes to the toolbar instead. This matches + // its initial placement anyway. And since the button may be hidden by + // default by extensions.hideNoScript, we want to make sure that if it + // becomes unhidden it is shown rather than in the unified extensions + // panel. See tor-browser#41581. + this.addWidgetToArea( + widgetId, + widgetId === NoScriptId + ? CustomizableUI.AREA_NAVBAR + : CustomizableUI.AREA_ADDONS + ); } } }, ===================================== browser/components/extensions/parent/ext-browserAction.js ===================================== @@ -176,10 +176,6 @@ this.browserAction = class extends ExtensionAPIPersistent { } build() { - // The extension ID for NoScript (WebExtension) - const isNoScript = - this.extension.id === "{73a6fe31-595d-460b-a920-fcc0f8843232}"; - let { extension } = this; let widgetId = makeWidgetId(extension.id); let widget = CustomizableUI.createWidget({ @@ -190,11 +186,7 @@ this.browserAction = class extends ExtensionAPIPersistent { removable: true, label: this.action.getProperty(null, "title"), tooltiptext: this.action.getProperty(null, "title"), - // Do not want to add the NoScript extension to the toolbar by default. - // tor-browser#41736 - defaultArea: isNoScript - ? null - : browserAreas[this.action.getDefaultArea()], + defaultArea: browserAreas[this.action.getDefaultArea()], showInPrivateBrowsing: extension.privateBrowsingAllowed, disallowSubView: true, @@ -282,6 +274,22 @@ this.browserAction = class extends ExtensionAPIPersistent { node.append(button, menuButton); node.viewButton = button; + if (extension.isNoScript) { + // Hide NoScript by default. + // See tor-browser#41581. + const HIDE_NO_SCRIPT_PREF = "extensions.hideNoScript"; + const changeNoScriptVisibility = () => { + node.hidden = Services.prefs.getBoolPref(HIDE_NO_SCRIPT_PREF, true); + }; + // Since we expect the NoScript widget to only be destroyed on exit, + // we do not set up to remove the observer. + Services.prefs.addObserver( + HIDE_NO_SCRIPT_PREF, + changeNoScriptVisibility + ); + changeNoScriptVisibility(); + } + return node; }, ===================================== browser/locales/en-US/browser/base-browser.ftl ===================================== @@ -24,6 +24,11 @@ basebrowser-rfp-restore-window-size-button-ak = R basebrowser-addon-badge-recommended = Mozilla only recommends extensions that meet their standards for security and performance basebrowser-addon-badge-verified = Mozilla has reviewed this extension to meet their standards for security and performance +## Option to show or hide the NoScript extension button/item. +basebrowser-addon-noscript-visibility-label = Toolbar button +basebrowser-addon-noscript-visibility-show = Show +basebrowser-addon-noscript-visibility-hide = Hide + ## About dialog # "Mozilla Firefox" should be treated like a brand and it should be neither translated nor transliterated. ===================================== browser/themes/shared/addons/unified-extensions.css ===================================== @@ -238,3 +238,21 @@ unified-extensions-item > .subviewbutton { border-color: transparent; } } + +/* Extra rule for tor-browser. See tor-browser#41581. + * We want to hide the unified-extensions-button when it is empty. + * However, this button is needed as an anchor for addon notifications. E.g. + * when installing another addon and permissions pop up. + * If we simply marked it as "hidden" then it would not be used as an anchor, so + * the popup would fall back to using the identity button as an anchor instead. + * So instead, we use "visibility: collapse" whilst it is empty *and* it is not + * being used as an anchor (the open attribute is missing). */ +#unified-extensions-button.hide-empty:not([open]) { + visibility: collapse; + /* Ensure getBoundingClientRect().width returns 0. + * Even though this button is collapsed, and therefore should not take up any + * layout space, getBoundingClientRect will still measure the padding. + * If this was not zero, OverflowableToolbar#getOverflowInfo would + * over-measure the children width and would always overflow. */ + padding-inline: 0; +} ===================================== toolkit/components/extensions/Extension.sys.mjs ===================================== @@ -765,6 +765,15 @@ export class ExtensionData { this.eventPagesEnabled = lazy.eventPagesEnabled; } + /** + * Whether this is the NoScript extension. + * + * @type {boolean} + */ + get isNoScript() { + return this.id === "{73a6fe31-595d-460b-a920-fcc0f8843232}"; + } + /** * A factory function that allows the construction of ExtensionData, with * the isPrivileged flag computed asynchronously. @@ -3498,7 +3507,7 @@ export class Extension extends ExtensionData { } // Bug 40253: Explicitly allow NoScript in Private Browsing mode. - if (this.id === "{73a6fe31-595d-460b-a920-fcc0f8843232}") { + if (this.isNoScript) { lazy.ExtensionPermissions.add(this.id, { permissions: [PRIVATE_ALLOWED_PERMISSION], origins: [], ===================================== toolkit/mozapps/extensions/content/aboutaddons.html ===================================== @@ -508,6 +508,32 @@ <div class="addon-detail-sitepermissions"> <addon-sitepermissions-list></addon-sitepermissions-list> </div> + <!-- Add an option to show the NoScript toolbar button, if this is the + - NoScript addon. See tor-browser#41581. --> + <div + class="addon-detail-row addon-detail-row-noscript-visibility" + role="radiogroup" + hidden="hidden" + > + <span + class="addon-noscript-visibility-label" + data-l10n-id="basebrowser-addon-noscript-visibility-label" + ></span> + <div class="addon-detail-actions"> + <label class="radio-container-with-text"> + <input type="radio" name="noscript-visibility" value="show" /> + <span + data-l10n-id="basebrowser-addon-noscript-visibility-show" + ></span> + </label> + <label class="radio-container-with-text"> + <input type="radio" name="noscript-visibility" value="hide" /> + <span + data-l10n-id="basebrowser-addon-noscript-visibility-hide" + ></span> + </label> + </div> + </div> <div class="addon-detail-row addon-detail-row-updates"> <label data-l10n-id="addon-detail-updates-label"></label> <div class="addon-detail-actions"> ===================================== toolkit/mozapps/extensions/content/aboutaddons.js ===================================== @@ -2063,6 +2063,8 @@ class AddonSitePermissionsList extends HTMLElement { } customElements.define("addon-sitepermissions-list", AddonSitePermissionsList); +const HIDE_NO_SCRIPT_PREF = "extensions.hideNoScript"; + class AddonDetails extends HTMLElement { connectedCallback() { if (!this.children.length) { @@ -2070,12 +2072,61 @@ class AddonDetails extends HTMLElement { } this.deck.addEventListener("view-changed", this); this.descriptionShowMoreButton.addEventListener("click", this); + + // If this is for the NoScript extension, we listen for changes in the + // visibility of its toolbar button. + // See tor-browser#41581. + // NOTE: The addon should be set before being connected, so isNoScript will + // return a correct value. + if (this.isNoScript && !this._noScriptVisibilityObserver) { + this._noScriptVisibilityObserver = () => this.updateNoScriptVisibility(); + Services.prefs.addObserver( + HIDE_NO_SCRIPT_PREF, + this._noScriptVisibilityObserver + ); + } } disconnectedCallback() { this.inlineOptions.destroyBrowser(); this.deck.removeEventListener("view-changed", this); this.descriptionShowMoreButton.removeEventListener("click", this); + + if (this._noScriptVisibilityObserver) { + Services.prefs.removeObserver( + HIDE_NO_SCRIPT_PREF, + this._noScriptVisibilityObserver + ); + // Clear in case this is called again, or if connectedCallback is called. + delete this._noScriptVisibilityObserver; + } + } + + /** + * Whether this is a description for the NoScript extension. + * + * @type {boolean} + */ + get isNoScript() { + return this.addon?.id === "{73a6fe31-595d-460b-a920-fcc0f8843232}"; + } + + /** + * Update the shown visibility value for the NoScript extension's toolbar + * button. + */ + updateNoScriptVisibility() { + if (!this.isNoScript) { + return; + } + const visibility = Services.prefs.getBoolPref(HIDE_NO_SCRIPT_PREF, true) + ? "hide" + : "show"; + for (const input of this.querySelectorAll( + ".addon-detail-row-noscript-visibility input" + )) { + input.checked = input.value === visibility; + } } handleEvent(e) { @@ -2271,6 +2322,27 @@ class AddonDetails extends HTMLElement { "upgrade" ); + // If this is the NoScript extension, we want to show an option to change + // the visibility of its toolbar button. + // See tor-browser#41581. + const visibilityRow = this.querySelector( + ".addon-detail-row-noscript-visibility" + ); + visibilityRow.hidden = !this.isNoScript; + if (this.isNoScript) { + // Set up the aria-label for the role="radiogroup". + const visibilityLabel = visibilityRow.querySelector( + ".addon-noscript-visibility-label" + ); + visibilityLabel.id = ExtensionCommon.makeWidgetId( + `${addon.id}-noscript-visibility-label` + ); + visibilityRow.setAttribute("aria-labelledby", visibilityLabel.id); + + // Set the initial displayed value. + this.updateNoScriptVisibility(); + } + if (addon.type != "extension") { // Don't show any private browsing related section for non-extension // addon types, because not relevant or they are either always allowed @@ -2662,6 +2734,11 @@ class AddonCard extends HTMLElement { // Update the card if the add-on isn't active. this.update(); } + } else if (name == "noscript-visibility") { + // Update the NoScript toolbar button visibility. + // See tor-browser#41581. + const hide = e.target.value !== "show"; + Services.prefs.setBoolPref(HIDE_NO_SCRIPT_PREF, hide); } } else if (e.type == "mousedown") { // Open panel on mousedown when the mouse is used. View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/compare/e8fd5d… -- View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/compare/e8fd5d… You're receiving this email because of your account on gitlab.torproject.org.
1 0
0 0
[Git][tpo/applications/mullvad-browser][mullvad-browser-115.3.1esr-13.0-1] 6 commits: fixup! Bug 41736: Customize toolbar for base-browser.
by Pier Angelo Vendrame (@pierov) 05 Oct '23

05 Oct '23
Pier Angelo Vendrame pushed to branch mullvad-browser-115.3.1esr-13.0-1 at The Tor Project / Applications / Mullvad Browser Commits: 1d2c3ecd by Henry Wilkes at 2023-10-05T22:40:06+02:00 fixup! Bug 41736: Customize toolbar for base-browser. Bug 41736: Stop placing the NoScript button in the palette, and let it go to the toolbar by default when shown. - - - - - e1a841b6 by Henry Wilkes at 2023-10-05T22:40:07+02:00 fixup! Bug 41598: Prevent NoScript from being removed/disabled. Bug 41736: Add a isNoScript property to Extension class. - - - - - 4fb23317 by Henry Wilkes at 2023-10-05T22:40:08+02:00 Bug 41736: Hide NoScript extension&#39;s toolbar button by default. This hides it from both the toolbar and the unified extensions panel. We also hide the unified-extension-button if the panel would be empty: not including the NoScript button when it is hidden. As a result, this will be hidden by default until a user installs another extension (or shows the NoScript button and unpins it). - - - - - d7477bb4 by Henry Wilkes at 2023-10-05T22:40:08+02:00 fixup! Firefox preference overrides. Bug 41736: Hide NoScript extension by default. We also hide the unified-extension-button if it would be empty. - - - - - 3c39c8a3 by Henry Wilkes at 2023-10-05T22:40:09+02:00 fixup! Bug 41736: Customize toolbar for base-browser. Bug 41581: Keep NoScript button in the toolbar (but hidden) by default. Also includes some migration. - - - - - 8fded311 by Henry Wilkes at 2023-10-05T22:40:09+02:00 fixup! Base Browser strings Bug 41581: Add strings for changing the visibility of the NoScript toolbar button. - - - - - 9 changed files: - browser/app/profile/001-base-profile.js - browser/base/content/browser-addons.js - browser/components/customizableui/CustomizableUI.sys.mjs - browser/components/extensions/parent/ext-browserAction.js - browser/locales/en-US/browser/base-browser.ftl - browser/themes/shared/addons/unified-extensions.css - toolkit/components/extensions/Extension.sys.mjs - toolkit/mozapps/extensions/content/aboutaddons.html - toolkit/mozapps/extensions/content/aboutaddons.js Changes: ===================================== browser/app/profile/001-base-profile.js ===================================== @@ -220,6 +220,10 @@ pref("privacy.annotate_channels.strict_list.enabled", false); // Disable the Pocket extension (Bug #18886 and #31602) pref("extensions.pocket.enabled", false); +// Custom extensions preferences tor-browser#41581 +pref("extensions.hideNoScript", true); +pref("extensions.hideUnifiedWhenEmpty", true); + // Disable activity stream/"Recommended by Pocket" in about:home (Bug #41029) pref("browser.newtabpage.activity-stream.discoverystream.enabled", false); pref("browser.newtabpage.activity-stream.feeds.section.topstories", false); ===================================== browser/base/content/browser-addons.js ===================================== @@ -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) { ===================================== browser/components/customizableui/CustomizableUI.sys.mjs ===================================== @@ -65,7 +65,8 @@ var kVersion = 19; /** * The current version for base browser. */ -var kVersionBaseBrowser = 1; +var kVersionBaseBrowser = 2; +const NoScriptId = "_73a6fe31-595d-460b-a920-fcc0f8843232_-browser-action"; /** * Buttons removed from built-ins by version they were removed. kVersion must be @@ -850,6 +851,57 @@ var CustomizableUIInternal = { delete gSavedState.placements["PanelUI-contents"]; delete gSavedState.placements["addon-bar"]; } + + if (currentVersion < 2) { + // Matches against kVersion 19, i.e. when the unified-extensions-button + // was introduced and extensions were moved from the palette to + // AREA_ADDONS. + // For base browser, we want the NoScript addon to be moved from the + // default palette to AREA_NAVBAR, so that if it becomes shown through the + // preference extensions.hideNoScript it will appear in the toolbar. + // If the NoScript addon is already in AREA_NAVBAR, we instead flip the + // extensions.hideNoScript preference so that it remains visible. + // See tor-browser#41581. + const navbarPlacements = + gSavedState.placements[CustomizableUI.AREA_NAVBAR]; + if (navbarPlacements) { + let noScriptVisible = false; + for (const [area, placements] of Object.entries( + gSavedState.placements + )) { + const index = placements.indexOf(NoScriptId); + if (index === -1) { + continue; + } + if (area === CustomizableUI.AREA_ADDONS) { + // Has been placed in the ADDONS area. + // Most likely, this is an alpha or nightly user who received the + // firefox update in a run before this one. In this case, we want to + // match the same behaviour as a stable user: hide the button and + // move it to the NAVBAR instead. + placements.splice(index, 1); + } else { + // It is in an area other than the ADDON (and not in the palette). + noScriptVisible = true; + } + } + if (noScriptVisible) { + // Keep the button where it is and make sure it is visible. + Services.prefs.setBoolPref("extensions.hideNoScript", false); + } else { + // Should appear just before unified-extensions-button, which is + // currently not part of the default placements. + const placeIndex = navbarPlacements.indexOf( + "unified-extensions-button" + ); + if (placeIndex === -1) { + navbarPlacements.push(NoScriptId); + } else { + navbarPlacements.splice(placeIndex, 0, NoScriptId); + } + } + } + } }, _placeNewDefaultWidgetsInArea(aArea) { @@ -3409,7 +3461,17 @@ var CustomizableUIInternal = { CustomizableUI.isWebExtensionWidget(widgetId) && !oldAddonPlacements.includes(widgetId) ) { - this.addWidgetToArea(widgetId, CustomizableUI.AREA_ADDONS); + // When resetting, NoScript goes to the toolbar instead. This matches + // its initial placement anyway. And since the button may be hidden by + // default by extensions.hideNoScript, we want to make sure that if it + // becomes unhidden it is shown rather than in the unified extensions + // panel. See tor-browser#41581. + this.addWidgetToArea( + widgetId, + widgetId === NoScriptId + ? CustomizableUI.AREA_NAVBAR + : CustomizableUI.AREA_ADDONS + ); } } }, ===================================== browser/components/extensions/parent/ext-browserAction.js ===================================== @@ -176,10 +176,6 @@ this.browserAction = class extends ExtensionAPIPersistent { } build() { - // The extension ID for NoScript (WebExtension) - const isNoScript = - this.extension.id === "{73a6fe31-595d-460b-a920-fcc0f8843232}"; - let { extension } = this; let widgetId = makeWidgetId(extension.id); let widget = CustomizableUI.createWidget({ @@ -190,11 +186,7 @@ this.browserAction = class extends ExtensionAPIPersistent { removable: true, label: this.action.getProperty(null, "title"), tooltiptext: this.action.getProperty(null, "title"), - // Do not want to add the NoScript extension to the toolbar by default. - // tor-browser#41736 - defaultArea: isNoScript - ? null - : browserAreas[this.action.getDefaultArea()], + defaultArea: browserAreas[this.action.getDefaultArea()], showInPrivateBrowsing: extension.privateBrowsingAllowed, disallowSubView: true, @@ -282,6 +274,22 @@ this.browserAction = class extends ExtensionAPIPersistent { node.append(button, menuButton); node.viewButton = button; + if (extension.isNoScript) { + // Hide NoScript by default. + // See tor-browser#41581. + const HIDE_NO_SCRIPT_PREF = "extensions.hideNoScript"; + const changeNoScriptVisibility = () => { + node.hidden = Services.prefs.getBoolPref(HIDE_NO_SCRIPT_PREF, true); + }; + // Since we expect the NoScript widget to only be destroyed on exit, + // we do not set up to remove the observer. + Services.prefs.addObserver( + HIDE_NO_SCRIPT_PREF, + changeNoScriptVisibility + ); + changeNoScriptVisibility(); + } + return node; }, ===================================== browser/locales/en-US/browser/base-browser.ftl ===================================== @@ -24,6 +24,11 @@ basebrowser-rfp-restore-window-size-button-ak = R basebrowser-addon-badge-recommended = Mozilla only recommends extensions that meet their standards for security and performance basebrowser-addon-badge-verified = Mozilla has reviewed this extension to meet their standards for security and performance +## Option to show or hide the NoScript extension button/item. +basebrowser-addon-noscript-visibility-label = Toolbar button +basebrowser-addon-noscript-visibility-show = Show +basebrowser-addon-noscript-visibility-hide = Hide + ## About dialog # "Mozilla Firefox" should be treated like a brand and it should be neither translated nor transliterated. ===================================== browser/themes/shared/addons/unified-extensions.css ===================================== @@ -238,3 +238,21 @@ unified-extensions-item > .subviewbutton { border-color: transparent; } } + +/* Extra rule for tor-browser. See tor-browser#41581. + * We want to hide the unified-extensions-button when it is empty. + * However, this button is needed as an anchor for addon notifications. E.g. + * when installing another addon and permissions pop up. + * If we simply marked it as "hidden" then it would not be used as an anchor, so + * the popup would fall back to using the identity button as an anchor instead. + * So instead, we use "visibility: collapse" whilst it is empty *and* it is not + * being used as an anchor (the open attribute is missing). */ +#unified-extensions-button.hide-empty:not([open]) { + visibility: collapse; + /* Ensure getBoundingClientRect().width returns 0. + * Even though this button is collapsed, and therefore should not take up any + * layout space, getBoundingClientRect will still measure the padding. + * If this was not zero, OverflowableToolbar#getOverflowInfo would + * over-measure the children width and would always overflow. */ + padding-inline: 0; +} ===================================== toolkit/components/extensions/Extension.sys.mjs ===================================== @@ -765,6 +765,15 @@ export class ExtensionData { this.eventPagesEnabled = lazy.eventPagesEnabled; } + /** + * Whether this is the NoScript extension. + * + * @type {boolean} + */ + get isNoScript() { + return this.id === "{73a6fe31-595d-460b-a920-fcc0f8843232}"; + } + /** * A factory function that allows the construction of ExtensionData, with * the isPrivileged flag computed asynchronously. @@ -3498,7 +3507,7 @@ export class Extension extends ExtensionData { } // Bug 40253: Explicitly allow NoScript in Private Browsing mode. - if (this.id === "{73a6fe31-595d-460b-a920-fcc0f8843232}") { + if (this.isNoScript) { lazy.ExtensionPermissions.add(this.id, { permissions: [PRIVATE_ALLOWED_PERMISSION], origins: [], ===================================== toolkit/mozapps/extensions/content/aboutaddons.html ===================================== @@ -508,6 +508,32 @@ <div class="addon-detail-sitepermissions"> <addon-sitepermissions-list></addon-sitepermissions-list> </div> + <!-- Add an option to show the NoScript toolbar button, if this is the + - NoScript addon. See tor-browser#41581. --> + <div + class="addon-detail-row addon-detail-row-noscript-visibility" + role="radiogroup" + hidden="hidden" + > + <span + class="addon-noscript-visibility-label" + data-l10n-id="basebrowser-addon-noscript-visibility-label" + ></span> + <div class="addon-detail-actions"> + <label class="radio-container-with-text"> + <input type="radio" name="noscript-visibility" value="show" /> + <span + data-l10n-id="basebrowser-addon-noscript-visibility-show" + ></span> + </label> + <label class="radio-container-with-text"> + <input type="radio" name="noscript-visibility" value="hide" /> + <span + data-l10n-id="basebrowser-addon-noscript-visibility-hide" + ></span> + </label> + </div> + </div> <div class="addon-detail-row addon-detail-row-updates"> <label data-l10n-id="addon-detail-updates-label"></label> <div class="addon-detail-actions"> ===================================== toolkit/mozapps/extensions/content/aboutaddons.js ===================================== @@ -2063,6 +2063,8 @@ class AddonSitePermissionsList extends HTMLElement { } customElements.define("addon-sitepermissions-list", AddonSitePermissionsList); +const HIDE_NO_SCRIPT_PREF = "extensions.hideNoScript"; + class AddonDetails extends HTMLElement { connectedCallback() { if (!this.children.length) { @@ -2070,12 +2072,61 @@ class AddonDetails extends HTMLElement { } this.deck.addEventListener("view-changed", this); this.descriptionShowMoreButton.addEventListener("click", this); + + // If this is for the NoScript extension, we listen for changes in the + // visibility of its toolbar button. + // See tor-browser#41581. + // NOTE: The addon should be set before being connected, so isNoScript will + // return a correct value. + if (this.isNoScript && !this._noScriptVisibilityObserver) { + this._noScriptVisibilityObserver = () => this.updateNoScriptVisibility(); + Services.prefs.addObserver( + HIDE_NO_SCRIPT_PREF, + this._noScriptVisibilityObserver + ); + } } disconnectedCallback() { this.inlineOptions.destroyBrowser(); this.deck.removeEventListener("view-changed", this); this.descriptionShowMoreButton.removeEventListener("click", this); + + if (this._noScriptVisibilityObserver) { + Services.prefs.removeObserver( + HIDE_NO_SCRIPT_PREF, + this._noScriptVisibilityObserver + ); + // Clear in case this is called again, or if connectedCallback is called. + delete this._noScriptVisibilityObserver; + } + } + + /** + * Whether this is a description for the NoScript extension. + * + * @type {boolean} + */ + get isNoScript() { + return this.addon?.id === "{73a6fe31-595d-460b-a920-fcc0f8843232}"; + } + + /** + * Update the shown visibility value for the NoScript extension's toolbar + * button. + */ + updateNoScriptVisibility() { + if (!this.isNoScript) { + return; + } + const visibility = Services.prefs.getBoolPref(HIDE_NO_SCRIPT_PREF, true) + ? "hide" + : "show"; + for (const input of this.querySelectorAll( + ".addon-detail-row-noscript-visibility input" + )) { + input.checked = input.value === visibility; + } } handleEvent(e) { @@ -2271,6 +2322,27 @@ class AddonDetails extends HTMLElement { "upgrade" ); + // If this is the NoScript extension, we want to show an option to change + // the visibility of its toolbar button. + // See tor-browser#41581. + const visibilityRow = this.querySelector( + ".addon-detail-row-noscript-visibility" + ); + visibilityRow.hidden = !this.isNoScript; + if (this.isNoScript) { + // Set up the aria-label for the role="radiogroup". + const visibilityLabel = visibilityRow.querySelector( + ".addon-noscript-visibility-label" + ); + visibilityLabel.id = ExtensionCommon.makeWidgetId( + `${addon.id}-noscript-visibility-label` + ); + visibilityRow.setAttribute("aria-labelledby", visibilityLabel.id); + + // Set the initial displayed value. + this.updateNoScriptVisibility(); + } + if (addon.type != "extension") { // Don't show any private browsing related section for non-extension // addon types, because not relevant or they are either always allowed @@ -2662,6 +2734,11 @@ class AddonCard extends HTMLElement { // Update the card if the add-on isn't active. this.update(); } + } else if (name == "noscript-visibility") { + // Update the NoScript toolbar button visibility. + // See tor-browser#41581. + const hide = e.target.value !== "show"; + Services.prefs.setBoolPref(HIDE_NO_SCRIPT_PREF, hide); } } else if (e.type == "mousedown") { // Open panel on mousedown when the mouse is used. View it on GitLab: https://gitlab.torproject.org/tpo/applications/mullvad-browser/-/compare/2a… -- View it on GitLab: https://gitlab.torproject.org/tpo/applications/mullvad-browser/-/compare/2a… You're receiving this email because of your account on gitlab.torproject.org.
1 0
0 0
[Git][tpo/applications/mullvad-browser][mullvad-browser-115.3.1esr-13.0-1] fixup! MB 39: Add home page about:mullvad-browser
by Pier Angelo Vendrame (@pierov) 05 Oct '23

05 Oct '23
Pier Angelo Vendrame pushed to branch mullvad-browser-115.3.1esr-13.0-1 at The Tor Project / Applications / Mullvad Browser Commits: 2aa3828e by Pier Angelo Vendrame at 2023-10-05T22:38:50+02:00 fixup! MB 39: Add home page about:mullvad-browser MB 243: Make sure about:mullvad-browser is treated as a new tab page - - - - - 1 changed file: - browser/base/content/browser-places.js Changes: ===================================== browser/base/content/browser-places.js ===================================== @@ -1431,7 +1431,7 @@ var BookmarkingUI = { if (newTabURL == "about:blank") { newTabURL = "about:newtab"; } - let newTabURLs = [newTabURL, "about:home"]; + let newTabURLs = [newTabURL, "about:home", "about:mullvad-browser"]; if (PrivateBrowsingUtils.isWindowPrivate(window)) { newTabURLs.push("about:privatebrowsing"); } View it on GitLab: https://gitlab.torproject.org/tpo/applications/mullvad-browser/-/commit/2aa… -- View it on GitLab: https://gitlab.torproject.org/tpo/applications/mullvad-browser/-/commit/2aa… You're receiving this email because of your account on gitlab.torproject.org.
1 0
0 0
[Git][tpo/applications/mullvad-browser][mullvad-browser-115.3.1esr-13.0-1] fixup! MB 1: Mullvad Browser branding
by Pier Angelo Vendrame (@pierov) 05 Oct '23

05 Oct '23
Pier Angelo Vendrame pushed to branch mullvad-browser-115.3.1esr-13.0-1 at The Tor Project / Applications / Mullvad Browser Commits: caf1a83b by Pier Angelo Vendrame at 2023-10-05T22:10:10+02:00 fixup! MB 1: Mullvad Browser branding MB 244: Fix the link to Mullvad Browser Support - - - - - 1 changed file: - toolkit/content/widgets/moz-support-link/moz-support-link.mjs Changes: ===================================== toolkit/content/widgets/moz-support-link/moz-support-link.mjs ===================================== @@ -103,6 +103,12 @@ export default class MozSupportLink extends HTMLAnchorElement { #setHref() { let supportPage = this.getAttribute("support-page") ?? ""; + // Customize the link in about:preferences. + // See mullvad-browser#244 and tor-browser#41910. + if (supportPage === "preferences") { + this.href = "https://mullvad.net/en/help/"; + return; + } let base = MozSupportLink.SUPPORT_URL + supportPage; this.href = this.hasAttribute("utm-content") ? formatUTMParams(this.getAttribute("utm-content"), base) View it on GitLab: https://gitlab.torproject.org/tpo/applications/mullvad-browser/-/commit/caf… -- View it on GitLab: https://gitlab.torproject.org/tpo/applications/mullvad-browser/-/commit/caf… You're receiving this email because of your account on gitlab.torproject.org.
1 0
0 0
[Git][tpo/applications/tor-browser][tor-browser-115.3.1esr-13.0-1] 6 commits: fixup! Bug 41736: Customize toolbar for base-browser.
by Pier Angelo Vendrame (@pierov) 05 Oct '23

05 Oct '23
Pier Angelo Vendrame pushed to branch tor-browser-115.3.1esr-13.0-1 at The Tor Project / Applications / Tor Browser Commits: 197b6fdd by Henry Wilkes at 2023-10-05T20:20:02+01:00 fixup! Bug 41736: Customize toolbar for base-browser. Bug 41736: Stop placing the NoScript button in the palette, and let it go to the toolbar by default when shown. - - - - - 45b58e5a by Henry Wilkes at 2023-10-05T20:20:03+01:00 fixup! Bug 41598: Prevent NoScript from being removed/disabled. Bug 41736: Add a isNoScript property to Extension class. - - - - - ddd31383 by Henry Wilkes at 2023-10-05T20:20:03+01:00 Bug 41736: Hide NoScript extension&#39;s toolbar button by default. This hides it from both the toolbar and the unified extensions panel. We also hide the unified-extension-button if the panel would be empty: not including the NoScript button when it is hidden. As a result, this will be hidden by default until a user installs another extension (or shows the NoScript button and unpins it). - - - - - 96e80ac1 by Henry Wilkes at 2023-10-05T20:20:04+01:00 fixup! Firefox preference overrides. Bug 41736: Hide NoScript extension by default. We also hide the unified-extension-button if it would be empty. - - - - - db17a989 by Henry Wilkes at 2023-10-05T21:20:52+01:00 fixup! Bug 41736: Customize toolbar for base-browser. Bug 41581: Keep NoScript button in the toolbar (but hidden) by default. Also includes some migration. - - - - - 9db5d46d by Henry Wilkes at 2023-10-05T21:20:53+01:00 fixup! Base Browser strings Bug 41581: Add strings for changing the visibility of the NoScript toolbar button. - - - - - 9 changed files: - browser/app/profile/001-base-profile.js - browser/base/content/browser-addons.js - browser/components/customizableui/CustomizableUI.sys.mjs - browser/components/extensions/parent/ext-browserAction.js - browser/locales/en-US/browser/base-browser.ftl - browser/themes/shared/addons/unified-extensions.css - toolkit/components/extensions/Extension.sys.mjs - toolkit/mozapps/extensions/content/aboutaddons.html - toolkit/mozapps/extensions/content/aboutaddons.js Changes: ===================================== browser/app/profile/001-base-profile.js ===================================== @@ -220,6 +220,10 @@ pref("privacy.annotate_channels.strict_list.enabled", false); // Disable the Pocket extension (Bug #18886 and #31602) pref("extensions.pocket.enabled", false); +// Custom extensions preferences tor-browser#41581 +pref("extensions.hideNoScript", true); +pref("extensions.hideUnifiedWhenEmpty", true); + // Disable activity stream/"Recommended by Pocket" in about:home (Bug #41029) pref("browser.newtabpage.activity-stream.discoverystream.enabled", false); pref("browser.newtabpage.activity-stream.feeds.section.topstories", false); ===================================== browser/base/content/browser-addons.js ===================================== @@ -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) { ===================================== browser/components/customizableui/CustomizableUI.sys.mjs ===================================== @@ -65,7 +65,8 @@ var kVersion = 19; /** * The current version for base browser. */ -var kVersionBaseBrowser = 1; +var kVersionBaseBrowser = 2; +const NoScriptId = "_73a6fe31-595d-460b-a920-fcc0f8843232_-browser-action"; /** * The current version for tor browser. @@ -858,6 +859,57 @@ var CustomizableUIInternal = { delete gSavedState.placements["PanelUI-contents"]; delete gSavedState.placements["addon-bar"]; } + + if (currentVersion < 2) { + // Matches against kVersion 19, i.e. when the unified-extensions-button + // was introduced and extensions were moved from the palette to + // AREA_ADDONS. + // For base browser, we want the NoScript addon to be moved from the + // default palette to AREA_NAVBAR, so that if it becomes shown through the + // preference extensions.hideNoScript it will appear in the toolbar. + // If the NoScript addon is already in AREA_NAVBAR, we instead flip the + // extensions.hideNoScript preference so that it remains visible. + // See tor-browser#41581. + const navbarPlacements = + gSavedState.placements[CustomizableUI.AREA_NAVBAR]; + if (navbarPlacements) { + let noScriptVisible = false; + for (const [area, placements] of Object.entries( + gSavedState.placements + )) { + const index = placements.indexOf(NoScriptId); + if (index === -1) { + continue; + } + if (area === CustomizableUI.AREA_ADDONS) { + // Has been placed in the ADDONS area. + // Most likely, this is an alpha or nightly user who received the + // firefox update in a run before this one. In this case, we want to + // match the same behaviour as a stable user: hide the button and + // move it to the NAVBAR instead. + placements.splice(index, 1); + } else { + // It is in an area other than the ADDON (and not in the palette). + noScriptVisible = true; + } + } + if (noScriptVisible) { + // Keep the button where it is and make sure it is visible. + Services.prefs.setBoolPref("extensions.hideNoScript", false); + } else { + // Should appear just before unified-extensions-button, which is + // currently not part of the default placements. + const placeIndex = navbarPlacements.indexOf( + "unified-extensions-button" + ); + if (placeIndex === -1) { + navbarPlacements.push(NoScriptId); + } else { + navbarPlacements.splice(placeIndex, 0, NoScriptId); + } + } + } + } }, _updateForTorBrowser() { @@ -3441,7 +3493,17 @@ var CustomizableUIInternal = { CustomizableUI.isWebExtensionWidget(widgetId) && !oldAddonPlacements.includes(widgetId) ) { - this.addWidgetToArea(widgetId, CustomizableUI.AREA_ADDONS); + // When resetting, NoScript goes to the toolbar instead. This matches + // its initial placement anyway. And since the button may be hidden by + // default by extensions.hideNoScript, we want to make sure that if it + // becomes unhidden it is shown rather than in the unified extensions + // panel. See tor-browser#41581. + this.addWidgetToArea( + widgetId, + widgetId === NoScriptId + ? CustomizableUI.AREA_NAVBAR + : CustomizableUI.AREA_ADDONS + ); } } }, ===================================== browser/components/extensions/parent/ext-browserAction.js ===================================== @@ -176,10 +176,6 @@ this.browserAction = class extends ExtensionAPIPersistent { } build() { - // The extension ID for NoScript (WebExtension) - const isNoScript = - this.extension.id === "{73a6fe31-595d-460b-a920-fcc0f8843232}"; - let { extension } = this; let widgetId = makeWidgetId(extension.id); let widget = CustomizableUI.createWidget({ @@ -190,11 +186,7 @@ this.browserAction = class extends ExtensionAPIPersistent { removable: true, label: this.action.getProperty(null, "title"), tooltiptext: this.action.getProperty(null, "title"), - // Do not want to add the NoScript extension to the toolbar by default. - // tor-browser#41736 - defaultArea: isNoScript - ? null - : browserAreas[this.action.getDefaultArea()], + defaultArea: browserAreas[this.action.getDefaultArea()], showInPrivateBrowsing: extension.privateBrowsingAllowed, disallowSubView: true, @@ -282,6 +274,22 @@ this.browserAction = class extends ExtensionAPIPersistent { node.append(button, menuButton); node.viewButton = button; + if (extension.isNoScript) { + // Hide NoScript by default. + // See tor-browser#41581. + const HIDE_NO_SCRIPT_PREF = "extensions.hideNoScript"; + const changeNoScriptVisibility = () => { + node.hidden = Services.prefs.getBoolPref(HIDE_NO_SCRIPT_PREF, true); + }; + // Since we expect the NoScript widget to only be destroyed on exit, + // we do not set up to remove the observer. + Services.prefs.addObserver( + HIDE_NO_SCRIPT_PREF, + changeNoScriptVisibility + ); + changeNoScriptVisibility(); + } + return node; }, ===================================== browser/locales/en-US/browser/base-browser.ftl ===================================== @@ -24,6 +24,11 @@ basebrowser-rfp-restore-window-size-button-ak = R basebrowser-addon-badge-recommended = Mozilla only recommends extensions that meet their standards for security and performance basebrowser-addon-badge-verified = Mozilla has reviewed this extension to meet their standards for security and performance +## Option to show or hide the NoScript extension button/item. +basebrowser-addon-noscript-visibility-label = Toolbar button +basebrowser-addon-noscript-visibility-show = Show +basebrowser-addon-noscript-visibility-hide = Hide + ## About dialog # "Mozilla Firefox" should be treated like a brand and it should be neither translated nor transliterated. ===================================== browser/themes/shared/addons/unified-extensions.css ===================================== @@ -238,3 +238,21 @@ unified-extensions-item > .subviewbutton { border-color: transparent; } } + +/* Extra rule for tor-browser. See tor-browser#41581. + * We want to hide the unified-extensions-button when it is empty. + * However, this button is needed as an anchor for addon notifications. E.g. + * when installing another addon and permissions pop up. + * If we simply marked it as "hidden" then it would not be used as an anchor, so + * the popup would fall back to using the identity button as an anchor instead. + * So instead, we use "visibility: collapse" whilst it is empty *and* it is not + * being used as an anchor (the open attribute is missing). */ +#unified-extensions-button.hide-empty:not([open]) { + visibility: collapse; + /* Ensure getBoundingClientRect().width returns 0. + * Even though this button is collapsed, and therefore should not take up any + * layout space, getBoundingClientRect will still measure the padding. + * If this was not zero, OverflowableToolbar#getOverflowInfo would + * over-measure the children width and would always overflow. */ + padding-inline: 0; +} ===================================== toolkit/components/extensions/Extension.sys.mjs ===================================== @@ -765,6 +765,15 @@ export class ExtensionData { this.eventPagesEnabled = lazy.eventPagesEnabled; } + /** + * Whether this is the NoScript extension. + * + * @type {boolean} + */ + get isNoScript() { + return this.id === "{73a6fe31-595d-460b-a920-fcc0f8843232}"; + } + /** * A factory function that allows the construction of ExtensionData, with * the isPrivileged flag computed asynchronously. @@ -3498,7 +3507,7 @@ export class Extension extends ExtensionData { } // Bug 40253: Explicitly allow NoScript in Private Browsing mode. - if (this.id === "{73a6fe31-595d-460b-a920-fcc0f8843232}") { + if (this.isNoScript) { lazy.ExtensionPermissions.add(this.id, { permissions: [PRIVATE_ALLOWED_PERMISSION], origins: [], ===================================== toolkit/mozapps/extensions/content/aboutaddons.html ===================================== @@ -508,6 +508,32 @@ <div class="addon-detail-sitepermissions"> <addon-sitepermissions-list></addon-sitepermissions-list> </div> + <!-- Add an option to show the NoScript toolbar button, if this is the + - NoScript addon. See tor-browser#41581. --> + <div + class="addon-detail-row addon-detail-row-noscript-visibility" + role="radiogroup" + hidden="hidden" + > + <span + class="addon-noscript-visibility-label" + data-l10n-id="basebrowser-addon-noscript-visibility-label" + ></span> + <div class="addon-detail-actions"> + <label class="radio-container-with-text"> + <input type="radio" name="noscript-visibility" value="show" /> + <span + data-l10n-id="basebrowser-addon-noscript-visibility-show" + ></span> + </label> + <label class="radio-container-with-text"> + <input type="radio" name="noscript-visibility" value="hide" /> + <span + data-l10n-id="basebrowser-addon-noscript-visibility-hide" + ></span> + </label> + </div> + </div> <div class="addon-detail-row addon-detail-row-updates"> <label data-l10n-id="addon-detail-updates-label"></label> <div class="addon-detail-actions"> ===================================== toolkit/mozapps/extensions/content/aboutaddons.js ===================================== @@ -2063,6 +2063,8 @@ class AddonSitePermissionsList extends HTMLElement { } customElements.define("addon-sitepermissions-list", AddonSitePermissionsList); +const HIDE_NO_SCRIPT_PREF = "extensions.hideNoScript"; + class AddonDetails extends HTMLElement { connectedCallback() { if (!this.children.length) { @@ -2070,12 +2072,61 @@ class AddonDetails extends HTMLElement { } this.deck.addEventListener("view-changed", this); this.descriptionShowMoreButton.addEventListener("click", this); + + // If this is for the NoScript extension, we listen for changes in the + // visibility of its toolbar button. + // See tor-browser#41581. + // NOTE: The addon should be set before being connected, so isNoScript will + // return a correct value. + if (this.isNoScript && !this._noScriptVisibilityObserver) { + this._noScriptVisibilityObserver = () => this.updateNoScriptVisibility(); + Services.prefs.addObserver( + HIDE_NO_SCRIPT_PREF, + this._noScriptVisibilityObserver + ); + } } disconnectedCallback() { this.inlineOptions.destroyBrowser(); this.deck.removeEventListener("view-changed", this); this.descriptionShowMoreButton.removeEventListener("click", this); + + if (this._noScriptVisibilityObserver) { + Services.prefs.removeObserver( + HIDE_NO_SCRIPT_PREF, + this._noScriptVisibilityObserver + ); + // Clear in case this is called again, or if connectedCallback is called. + delete this._noScriptVisibilityObserver; + } + } + + /** + * Whether this is a description for the NoScript extension. + * + * @type {boolean} + */ + get isNoScript() { + return this.addon?.id === "{73a6fe31-595d-460b-a920-fcc0f8843232}"; + } + + /** + * Update the shown visibility value for the NoScript extension's toolbar + * button. + */ + updateNoScriptVisibility() { + if (!this.isNoScript) { + return; + } + const visibility = Services.prefs.getBoolPref(HIDE_NO_SCRIPT_PREF, true) + ? "hide" + : "show"; + for (const input of this.querySelectorAll( + ".addon-detail-row-noscript-visibility input" + )) { + input.checked = input.value === visibility; + } } handleEvent(e) { @@ -2271,6 +2322,27 @@ class AddonDetails extends HTMLElement { "upgrade" ); + // If this is the NoScript extension, we want to show an option to change + // the visibility of its toolbar button. + // See tor-browser#41581. + const visibilityRow = this.querySelector( + ".addon-detail-row-noscript-visibility" + ); + visibilityRow.hidden = !this.isNoScript; + if (this.isNoScript) { + // Set up the aria-label for the role="radiogroup". + const visibilityLabel = visibilityRow.querySelector( + ".addon-noscript-visibility-label" + ); + visibilityLabel.id = ExtensionCommon.makeWidgetId( + `${addon.id}-noscript-visibility-label` + ); + visibilityRow.setAttribute("aria-labelledby", visibilityLabel.id); + + // Set the initial displayed value. + this.updateNoScriptVisibility(); + } + if (addon.type != "extension") { // Don't show any private browsing related section for non-extension // addon types, because not relevant or they are either always allowed @@ -2662,6 +2734,11 @@ class AddonCard extends HTMLElement { // Update the card if the add-on isn't active. this.update(); } + } else if (name == "noscript-visibility") { + // Update the NoScript toolbar button visibility. + // See tor-browser#41581. + const hide = e.target.value !== "show"; + Services.prefs.setBoolPref(HIDE_NO_SCRIPT_PREF, hide); } } else if (e.type == "mousedown") { // Open panel on mousedown when the mouse is used. View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/compare/8ec6aa… -- View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/compare/8ec6aa… You're receiving this email because of your account on gitlab.torproject.org.
1 0
0 0
[Git][tpo/applications/tor-browser][base-browser-115.3.1esr-13.0-1] fixup! Firefox preference overrides.
by Pier Angelo Vendrame (@pierov) 05 Oct '23

05 Oct '23
Pier Angelo Vendrame pushed to branch base-browser-115.3.1esr-13.0-1 at The Tor Project / Applications / Tor Browser Commits: e8fd5db4 by Pier Angelo Vendrame at 2023-10-05T21:57:51+02:00 fixup! Firefox preference overrides. Bug 41576: Make sure weather and addon suggestions stay off. Better to set them already for the next ESR. - - - - - 1 changed file: - browser/app/profile/001-base-profile.js Changes: ===================================== browser/app/profile/001-base-profile.js ===================================== @@ -143,6 +143,12 @@ pref("browser.search.suggest.enabled.private", false); pref("browser.urlbar.suggest.searches", false); pref("browser.urlbar.suggest.quicksuggest.nonsponsored", false); pref("browser.urlbar.suggest.quicksuggest.sponsored", false); +// tor-browser#41576: Do not suggest weather and addons. +pref("browser.urlbar.suggest.addons", false); +pref("browser.urlbar.addons.featureGate", false); +pref("browser.urlbar.suggest.weather", false); +pref("browser.urlbar.weather.featureGate", false); +// tor-browser#41691: Hide "Firefox Suggets" in the UI pref("browser.urlbar.groupLabels.enabled", false); pref("browser.safebrowsing.malware.enabled", false); pref("browser.safebrowsing.phishing.enabled", false); View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/e8fd5db… -- View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/e8fd5db… You're receiving this email because of your account on gitlab.torproject.org.
1 0
0 0
[Git][tpo/applications/mullvad-browser][mullvad-browser-115.3.1esr-13.0-1] fixup! Firefox preference overrides.
by Pier Angelo Vendrame (@pierov) 05 Oct '23

05 Oct '23
Pier Angelo Vendrame pushed to branch mullvad-browser-115.3.1esr-13.0-1 at The Tor Project / Applications / Mullvad Browser Commits: 3c403c7b by Pier Angelo Vendrame at 2023-10-05T21:56:05+02:00 fixup! Firefox preference overrides. Bug 41576: Make sure weather and addon suggestions stay off. Better to set them already for the next ESR. - - - - - 1 changed file: - browser/app/profile/001-base-profile.js Changes: ===================================== browser/app/profile/001-base-profile.js ===================================== @@ -143,6 +143,12 @@ pref("browser.search.suggest.enabled.private", false); pref("browser.urlbar.suggest.searches", false); pref("browser.urlbar.suggest.quicksuggest.nonsponsored", false); pref("browser.urlbar.suggest.quicksuggest.sponsored", false); +// tor-browser#41576: Do not suggest weather and addons. +pref("browser.urlbar.suggest.addons", false); +pref("browser.urlbar.addons.featureGate", false); +pref("browser.urlbar.suggest.weather", false); +pref("browser.urlbar.weather.featureGate", false); +// tor-browser#41691: Hide "Firefox Suggets" in the UI pref("browser.urlbar.groupLabels.enabled", false); pref("browser.safebrowsing.malware.enabled", false); pref("browser.safebrowsing.phishing.enabled", false); View it on GitLab: https://gitlab.torproject.org/tpo/applications/mullvad-browser/-/commit/3c4… -- View it on GitLab: https://gitlab.torproject.org/tpo/applications/mullvad-browser/-/commit/3c4… You're receiving this email because of your account on gitlab.torproject.org.
1 0
0 0
[Git][tpo/applications/mullvad-browser][mullvad-browser-115.3.1esr-13.0-1] fixup! Bug 40926: Implemented the New Identity feature
by ma1 (@ma1) 05 Oct '23

05 Oct '23
ma1 pushed to branch mullvad-browser-115.3.1esr-13.0-1 at The Tor Project / Applications / Mullvad Browser Commits: 56b44ebf by hackademix at 2023-10-05T19:06:10+02:00 fixup! Bug 40926: Implemented the New Identity feature Bug 41765: Force about:privatebrowsing in new identity window. - - - - - 2 changed files: - browser/base/content/browser.js - browser/components/newidentity/content/newidentity.js Changes: ===================================== browser/base/content/browser.js ===================================== @@ -4523,7 +4523,7 @@ function OpenBrowserWindow(options) { var extraFeatures = ""; if (options && options.private && PrivateBrowsingUtils.enabled) { extraFeatures = ",private"; - if (!PrivateBrowsingUtils.permanentPrivateBrowsing) { + if (!PrivateBrowsingUtils.permanentPrivateBrowsing || options.private === "no-home") { // Force the new window to load about:privatebrowsing instead of the default home page defaultArgs = "about:privatebrowsing"; } ===================================== browser/components/newidentity/content/newidentity.js ===================================== @@ -433,11 +433,8 @@ XPCOMUtils.defineLazyGetter(this, "NewIdentityButton", () => { openNewWindow() { logger.info("Opening a new window"); return new Promise(resolve => { - // Open a new window with the default homepage - // We could pass {private: true} but we do not because we enforce - // browser.privatebrowsing.autostart = true. - // What about users that change settings? - const win = OpenBrowserWindow(); + // Open a new window forcing the about:privatebrowsing page (tor-browser#41765) + const win = OpenBrowserWindow({private: "no-home"}); // This mechanism to know when the new window is ready is used by // OpenBrowserWindow itself (see its definition in browser.js). win.addEventListener("MozAfterPaint", () => resolve(), { once: true }); View it on GitLab: https://gitlab.torproject.org/tpo/applications/mullvad-browser/-/commit/56b… -- View it on GitLab: https://gitlab.torproject.org/tpo/applications/mullvad-browser/-/commit/56b… You're receiving this email because of your account on gitlab.torproject.org.
1 0
0 0
[Git][tpo/applications/tor-browser][base-browser-115.3.1esr-13.0-1] fixup! Bug 40926: Implemented the New Identity feature
by ma1 (@ma1) 05 Oct '23

05 Oct '23
ma1 pushed to branch base-browser-115.3.1esr-13.0-1 at The Tor Project / Applications / Tor Browser Commits: b5574131 by hackademix at 2023-10-05T19:03:10+02:00 fixup! Bug 40926: Implemented the New Identity feature Bug 41765: Force about:privatebrowsing in new identity window. - - - - - 2 changed files: - browser/base/content/browser.js - browser/components/newidentity/content/newidentity.js Changes: ===================================== browser/base/content/browser.js ===================================== @@ -4521,7 +4521,7 @@ function OpenBrowserWindow(options) { var extraFeatures = ""; if (options && options.private && PrivateBrowsingUtils.enabled) { extraFeatures = ",private"; - if (!PrivateBrowsingUtils.permanentPrivateBrowsing) { + if (!PrivateBrowsingUtils.permanentPrivateBrowsing || options.private === "no-home") { // Force the new window to load about:privatebrowsing instead of the default home page defaultArgs = "about:privatebrowsing"; } ===================================== browser/components/newidentity/content/newidentity.js ===================================== @@ -433,11 +433,8 @@ XPCOMUtils.defineLazyGetter(this, "NewIdentityButton", () => { openNewWindow() { logger.info("Opening a new window"); return new Promise(resolve => { - // Open a new window with the default homepage - // We could pass {private: true} but we do not because we enforce - // browser.privatebrowsing.autostart = true. - // What about users that change settings? - const win = OpenBrowserWindow(); + // Open a new window forcing the about:privatebrowsing page (tor-browser#41765) + const win = OpenBrowserWindow({private: "no-home"}); // This mechanism to know when the new window is ready is used by // OpenBrowserWindow itself (see its definition in browser.js). win.addEventListener("MozAfterPaint", () => resolve(), { once: true }); View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/b557413… -- View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/b557413… You're receiving this email because of your account on gitlab.torproject.org.
1 0
0 0
[Git][tpo/applications/tor-browser][tor-browser-115.3.1esr-13.0-1] 2 commits: fixup! Bug 31286: Implementation of bridge, proxy, and firewall settings in...
by Pier Angelo Vendrame (@pierov) 05 Oct '23

05 Oct '23
Pier Angelo Vendrame pushed to branch tor-browser-115.3.1esr-13.0-1 at The Tor Project / Applications / Tor Browser Commits: 6fe8a2bf by Pier Angelo Vendrame at 2023-10-05T18:54:20+02:00 fixup! Bug 31286: Implementation of bridge, proxy, and firewall settings in about:preferences#connection Bug 42155: Drop the unused code for the old bridge removal warning - - - - - 8ec6aad8 by Pier Angelo Vendrame at 2023-10-05T18:54:22+02:00 fixup! Bug 31286: Implementation of bridge, proxy, and firewall settings in about:preferences#connection Bug 41974: Update the rule for de-emphasized text in bridge addresses - - - - - 2 changed files: - browser/components/torpreferences/content/connectionPane.js - browser/components/torpreferences/content/torPreferences.css Changes: ===================================== browser/components/torpreferences/content/connectionPane.js ===================================== @@ -125,13 +125,6 @@ const gConnectionPane = (function () { requestButton: "#torPreferences-addBridge-buttonRequestBridge", enterLabel: "#torPreferences-addBridge-labelEnterBridge", enterButton: "#torPreferences-addBridge-buttonEnterBridge", - removeOverlay: "#bridge-remove-overlay", - removeModal: "#bridge-remove-modal", - removeDismiss: "#bridge-remove-dismiss", - removeQuestion: "#bridge-remove-question", - removeWarning: "#bridge-remove-warning", - removeConfirm: "#bridge-remove-confirm", - removeCancel: "#bridge-remove-cancel", }, advanced: { header: "h1#torPreferences-advanced-header", ===================================== browser/components/torpreferences/content/torPreferences.css ===================================== @@ -332,7 +332,7 @@ input.torPreferences-bridgeCard-addr { width: 100%; - color: var(--in-content-deemphasized-text); + color: var(--text-color-deemphasized); } .torPreferences-bridgeCard-leranMoreBox { @@ -511,94 +511,3 @@ textarea#torPreferences-torDialog-textarea { /* 10 lines */ min-height: 20em; } - -/* Bridge remove overlay */ -#bridge-remove-overlay { - position: fixed; - display: flex; - align-items: center; - justify-content: center; - top: 0; - inset: 0; - width: 100%; - height: 100%; - z-index: 1; - background-color: rgba(0, 0, 0, 0.5); -} - -#bridge-remove-overlay.hidden { - display: none; -} - -#bridge-remove-modal { - position: relative; - min-width: 250px; - max-width: 500px; - min-height: 200px; - z-index: 2; - text-align: center; - background: var(--in-content-page-background); - box-shadow: var(--shadow-30); -} - -#bridge-remove-dismiss { - position: absolute; - top: 16px; - inset-inline-end: 16px; - width: 16px; - height: 16px; - fill: currentColor; - -moz-context-properties: fill; -} - -#bridge-remove-dismiss:hover { - background-color: var(--in-content-button-background-hover); - color: var(--in-content-button-text-color-hover); - border: 1px solid var(--in-content-button-border-color-hover); - border-radius: 4px; -} - -#bridge-remove-dismiss:hover:active { - background-color: var(--in-content-button-background-active); -} - -#bridge-remove-icon { - width: 40px; - height: 40px; - background-image: url("chrome://global/skin/icons/warning.svg"); - background-size: 40px; - margin: 16px auto; - fill: currentColor; - -moz-context-properties: fill; -} - -#bridge-remove-question { - font-size: 150%; -} - -#bridge-remove-warning { - color: var(--in-content-deemphasized-text); -} - -#bridge-remove-buttonbar { - padding: 16px 32px; -} - -#bridge-remove-buttonbar button { - min-width: 140px; -} - -#bridge-remove-confirm { - background: var(--in-content-danger-button-background); - color: var(--in-content-primary-button-text-color); -} - -#bridge-remove-confirm:hover { - background: var(--in-content-danger-button-background-hover); - color: var(--in-content-primary-button-text-color-hover); - border-color: var(--in-content-primary-button-border-hover); -} - -#bridge-remove-confirm:hover:active { - background: var(--in-content-danger-button-background-active); -} View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/compare/c62d34… -- View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/compare/c62d34… You're receiving this email because of your account on gitlab.torproject.org.
1 0
0 0
[Git][tpo/applications/tor-browser][tor-browser-115.3.1esr-13.0-1] fixup! Bug 40926: Implemented the New Identity feature
by ma1 (@ma1) 05 Oct '23

05 Oct '23
ma1 pushed to branch tor-browser-115.3.1esr-13.0-1 at The Tor Project / Applications / Tor Browser Commits: c62d3405 by hackademix at 2023-10-05T17:34:00+02:00 fixup! Bug 40926: Implemented the New Identity feature Bug 41765: Force about:privatebrowsing in new identity window. - - - - - 2 changed files: - browser/base/content/browser.js - browser/components/newidentity/content/newidentity.js Changes: ===================================== browser/base/content/browser.js ===================================== @@ -4585,7 +4585,7 @@ function OpenBrowserWindow(options) { var extraFeatures = ""; if (options && options.private && PrivateBrowsingUtils.enabled) { extraFeatures = ",private"; - if (!PrivateBrowsingUtils.permanentPrivateBrowsing) { + if (!PrivateBrowsingUtils.permanentPrivateBrowsing || options.private === "no-home") { // Force the new window to load about:privatebrowsing instead of the default home page defaultArgs = "about:privatebrowsing"; } ===================================== browser/components/newidentity/content/newidentity.js ===================================== @@ -433,11 +433,8 @@ XPCOMUtils.defineLazyGetter(this, "NewIdentityButton", () => { openNewWindow() { logger.info("Opening a new window"); return new Promise(resolve => { - // Open a new window with the default homepage - // We could pass {private: true} but we do not because we enforce - // browser.privatebrowsing.autostart = true. - // What about users that change settings? - const win = OpenBrowserWindow(); + // Open a new window forcing the about:privatebrowsing page (tor-browser#41765) + const win = OpenBrowserWindow({private: "no-home"}); // This mechanism to know when the new window is ready is used by // OpenBrowserWindow itself (see its definition in browser.js). win.addEventListener("MozAfterPaint", () => resolve(), { once: true }); View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/c62d340… -- View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/c62d340… You're receiving this email because of your account on gitlab.torproject.org.
1 0
0 0
[Git][tpo/applications/tor-browser][tor-browser-115.3.1esr-13.0-1] fixup! Firefox preference overrides.
by Pier Angelo Vendrame (@pierov) 05 Oct '23

05 Oct '23
Pier Angelo Vendrame pushed to branch tor-browser-115.3.1esr-13.0-1 at The Tor Project / Applications / Tor Browser Commits: 251bec3a by Pier Angelo Vendrame at 2023-10-05T14:36:34+02:00 fixup! Firefox preference overrides. Bug 41576: Make sure weather and addon suggestions stay off. Better to set them already for the next ESR. - - - - - 1 changed file: - browser/app/profile/001-base-profile.js Changes: ===================================== browser/app/profile/001-base-profile.js ===================================== @@ -143,6 +143,12 @@ pref("browser.search.suggest.enabled.private", false); pref("browser.urlbar.suggest.searches", false); pref("browser.urlbar.suggest.quicksuggest.nonsponsored", false); pref("browser.urlbar.suggest.quicksuggest.sponsored", false); +// tor-browser#41576: Do not suggest weather and addons. +pref("browser.urlbar.suggest.addons", false); +pref("browser.urlbar.addons.featureGate", false); +pref("browser.urlbar.suggest.weather", false); +pref("browser.urlbar.weather.featureGate", false); +// tor-browser#41691: Hide "Firefox Suggets" in the UI pref("browser.urlbar.groupLabels.enabled", false); pref("browser.safebrowsing.malware.enabled", false); pref("browser.safebrowsing.phishing.enabled", false); View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/251bec3… -- View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/251bec3… You're receiving this email because of your account on gitlab.torproject.org.
1 0
0 0
[Git][tpo/applications/tor-browser-build][maint-13.0] Bug 40940: Change position of the `install|portable` in the windows filenames
by Pier Angelo Vendrame (@pierov) 05 Oct '23

05 Oct '23
Pier Angelo Vendrame pushed to branch maint-13.0 at The Tor Project / Applications / tor-browser-build Commits: b4f9a5fd by Nicolas Vigier at 2023-10-05T09:10:41+02:00 Bug 40940: Change position of the `install|portable` in the windows filenames This is also fixing the download-windows-*.json files, which were missing since the filename change (for now, we only includ the `portable` build). - - - - - 2 changed files: - projects/browser/build - tools/update-responses/update_responses Changes: ===================================== projects/browser/build ===================================== @@ -400,11 +400,11 @@ cd $distdir makensis browser-portable.nsi # Working around NSIS braindamage python3 $rootdir/pe_checksum_fix.py browser-install.exe - mv browser-install.exe $OUTDIR/[% c("var/project-name") %]-portable-[% c("var/osname") %]-[% c("var/torbrowser_version") %].exe + mv browser-install.exe $OUTDIR/[% c("var/project-name") %]-[% c("var/osname") %]-portable-[% c("var/torbrowser_version") %].exe [% IF c('var/mullvad-browser') -%] makensis browser-system.nsi python3 $rootdir/pe_checksum_fix.py browser-install.exe - mv browser-install.exe $OUTDIR/[% c("var/project-name") %]-install-[% c("var/osname") %]-[% c("var/torbrowser_version") %].exe + mv browser-install.exe $OUTDIR/[% c("var/project-name") %]-[% c("var/osname") %]-install-[% c("var/torbrowser_version") %].exe [% END -%] popd [% END %] ===================================== tools/update-responses/update_responses ===================================== @@ -138,9 +138,9 @@ sub get_version_downloads { $os = 'macos'; } elsif ($file =~ m/^$config->{appname_bundle}-(linux-i686|linux-x86_64)-${version}.tar.xz$/) { $os = $1; - } elsif ($file =~ m/^$config->{appname_bundle}-windows-x86_64-${version}.exe$/) { + } elsif ($file =~ m/^$config->{appname_bundle}-windows-x86_64-portable-${version}.exe$/) { $os = 'win64'; - } elsif ($file =~ m/^$config->{appname_bundle}-windows-i686-${version}.exe$/) { + } elsif ($file =~ m/^$config->{appname_bundle}-windows-i686-portable-${version}.exe$/) { $os = 'win32'; } else { next; @@ -167,7 +167,7 @@ sub get_perplatform_downloads { $os = 'macos'; } elsif ($file =~ m/^$config->{appname_bundle}-(linux-i686|linux-86_64)-${version}.tar.xz$/) { $os = $1; - } elsif ($file =~ m/^$config->{appname_bundle}-(windows-i686|windows-86_64)-${version}.exe$/) { + } elsif ($file =~ m/^$config->{appname_bundle}-(windows-i686|windows-86_64)-portable-${version}.exe$/) { $os = $1; } elsif ($file =~ m/^$config->{appname_bundle}-(android-armv7|android-x86|android-x86_64|android-aarch64)-${version}.apk$/) { $os = $1; View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser-build/-/commit/b… -- View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser-build/-/commit/b… You're receiving this email because of your account on gitlab.torproject.org.
1 0
0 0
[Git][tpo/applications/tor-browser-build][main] Bug 40940: Change position of the `install|portable` in the windows filenames
by boklm (@boklm) 05 Oct '23

05 Oct '23
boklm pushed to branch main at The Tor Project / Applications / tor-browser-build Commits: b4f9a5fd by Nicolas Vigier at 2023-10-05T09:10:41+02:00 Bug 40940: Change position of the `install|portable` in the windows filenames This is also fixing the download-windows-*.json files, which were missing since the filename change (for now, we only includ the `portable` build). - - - - - 2 changed files: - projects/browser/build - tools/update-responses/update_responses Changes: ===================================== projects/browser/build ===================================== @@ -400,11 +400,11 @@ cd $distdir makensis browser-portable.nsi # Working around NSIS braindamage python3 $rootdir/pe_checksum_fix.py browser-install.exe - mv browser-install.exe $OUTDIR/[% c("var/project-name") %]-portable-[% c("var/osname") %]-[% c("var/torbrowser_version") %].exe + mv browser-install.exe $OUTDIR/[% c("var/project-name") %]-[% c("var/osname") %]-portable-[% c("var/torbrowser_version") %].exe [% IF c('var/mullvad-browser') -%] makensis browser-system.nsi python3 $rootdir/pe_checksum_fix.py browser-install.exe - mv browser-install.exe $OUTDIR/[% c("var/project-name") %]-install-[% c("var/osname") %]-[% c("var/torbrowser_version") %].exe + mv browser-install.exe $OUTDIR/[% c("var/project-name") %]-[% c("var/osname") %]-install-[% c("var/torbrowser_version") %].exe [% END -%] popd [% END %] ===================================== tools/update-responses/update_responses ===================================== @@ -138,9 +138,9 @@ sub get_version_downloads { $os = 'macos'; } elsif ($file =~ m/^$config->{appname_bundle}-(linux-i686|linux-x86_64)-${version}.tar.xz$/) { $os = $1; - } elsif ($file =~ m/^$config->{appname_bundle}-windows-x86_64-${version}.exe$/) { + } elsif ($file =~ m/^$config->{appname_bundle}-windows-x86_64-portable-${version}.exe$/) { $os = 'win64'; - } elsif ($file =~ m/^$config->{appname_bundle}-windows-i686-${version}.exe$/) { + } elsif ($file =~ m/^$config->{appname_bundle}-windows-i686-portable-${version}.exe$/) { $os = 'win32'; } else { next; @@ -167,7 +167,7 @@ sub get_perplatform_downloads { $os = 'macos'; } elsif ($file =~ m/^$config->{appname_bundle}-(linux-i686|linux-86_64)-${version}.tar.xz$/) { $os = $1; - } elsif ($file =~ m/^$config->{appname_bundle}-(windows-i686|windows-86_64)-${version}.exe$/) { + } elsif ($file =~ m/^$config->{appname_bundle}-(windows-i686|windows-86_64)-portable-${version}.exe$/) { $os = $1; } elsif ($file =~ m/^$config->{appname_bundle}-(android-armv7|android-x86|android-x86_64|android-aarch64)-${version}.apk$/) { $os = $1; View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser-build/-/commit/b… -- View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser-build/-/commit/b… You're receiving this email because of your account on gitlab.torproject.org.
1 0
0 0
[Git][tpo/applications/mullvad-browser][mullvad-browser-115.3.1esr-13.0-1] fixup! Firefox preference overrides.
by Pier Angelo Vendrame (@pierov) 05 Oct '23

05 Oct '23
Pier Angelo Vendrame pushed to branch mullvad-browser-115.3.1esr-13.0-1 at The Tor Project / Applications / Mullvad Browser Commits: 191e2c63 by Pier Angelo Vendrame at 2023-10-05T08:55:16+02:00 fixup! Firefox preference overrides. Bug 41496 (part 2): Pref review for 115/13.0. Added a couple of prefs that were suggested in the issue and I initially missed. Bug 42147: Add browser.helperApps.deleteTempFileOnExit to our profile - - - - - 1 changed file: - browser/app/profile/001-base-profile.js Changes: ===================================== browser/app/profile/001-base-profile.js ===================================== @@ -60,6 +60,11 @@ pref("browser.download.useDownloadDir", false); pref("browser.download.always_ask_before_handling_new_types", true); pref("browser.download.manager.addToRecentDocs", false); pref("browser.download.start_downloads_in_tmp_dir", true); +// tor-browser#42147: Always delete temporary files, also on macOS (this pref is +// already true for other platforms). +// Also, this always happens in PBM. If not in PBM, requires +// browser.download.start_downloads_in_tmp_dir to be true too. +pref("browser.helperApps.deleteTempFileOnExit", true); // Prevent download stuffing / DOS (tor-browser#41764) pref("browser.download.enable_spam_prevention", true); @@ -74,7 +79,7 @@ pref("signon.autofillForms", false, locked); pref("browser.sessionstore.privacy_level", 2); // Use the in-memory media cache and increase its maximum size (#29120) pref("browser.privatebrowsing.forceMediaMemoryCache", true); -pref("media.memory_cache_max_size", 16384); +pref("media.memory_cache_max_size", 65536); // Disable restore in case of crash (tor-browser#41503) // This should not be needed in PBM, but we added it anyway like other options. pref("browser.sessionstore.resume_from_crash", false); @@ -182,6 +187,8 @@ pref("default-browser-agent.enabled", false); #endif // Disable sync by default pref("identity.fxaccounts.enabled", false); +// Blank the sync URL as a defense in depth (added with tor-browser#41496) +pref("identity.sync.tokenserver.uri", ""); // Never sync with other browsers pref("services.sync.engine.addons", false); pref("services.sync.engine.addresses", false); @@ -373,6 +380,9 @@ pref("dom.textMetrics.fontBoundingBox.enabled", false); pref("pdfjs.enableScripting", false); // Bug 40057: Ensure system colors are not used for CSS4 colors pref("browser.display.use_system_colors", false); +// Enforce non-native widget theme (true by default, defense in depth). +// Provides a uniform look and feel across platforms. Added with tor-browser#41496. +pref("widget.non-native-theme.enabled", true); // tor-browser#41943: lock and revisit after it gets flipped to true in stable Firefox pref("javascript.options.spectre.disable_for_isolated_content", false, locked); @@ -517,6 +527,12 @@ pref("network.process.enabled", false); // Extension support pref("extensions.autoDisableScopes", 0); +// Only load extensions from the application and user profile. +// Do not load from the user directory (AddonManager.SCOPE_USER=2, which is +// shared between profiles, e.g., %appdata%\Mozilla\Extensions\ on Windows, or +// ~/.mozilla/extensions on Linux for Firefox), and do not load from system +// directories/the Windows registry (AddonManager.SCOPE_SYSTEM=8). +// More information: https://archive.ph/DYjAM pref("extensions.enabledScopes", 5); // AddonManager.SCOPE_PROFILE=1 | AddonManager.SCOPE_APPLICATION=4 // We don't know what extensions Mozilla is advertising to our users and we // don't want to have some random Google Analytics script running either on the View it on GitLab: https://gitlab.torproject.org/tpo/applications/mullvad-browser/-/commit/191… -- View it on GitLab: https://gitlab.torproject.org/tpo/applications/mullvad-browser/-/commit/191… You're receiving this email because of your account on gitlab.torproject.org.
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 229
  • 230
  • 231
  • 232
  • 233
  • 234
  • 235
  • ...
  • 839
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.