Merge branch 'zen-browser:dev' into adds-search-to-icons

This commit is contained in:
Studio Movie Girl
2024-12-23 14:30:11 -06:00
committed by GitHub
60 changed files with 1349 additions and 722 deletions

View File

@@ -1,179 +0,0 @@
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
//
/* You may copy+paste this file and use it as it is.
*
* If you make changes to your about:config while the program is running, the
* changes will be overwritten by the user.js when the application restarts.
*
* To make lasting changes to preferences, you will have to edit the user.js.
*/
/****************************************************************************
* Betterfox *
* "Ad meliora" *
* version: 130 *
* url: https://github.com/yokoffing/Betterfox *
****************************************************************************/
/****************************************************************************
* SECTION: FASTFOX *
****************************************************************************/
/** GENERAL ***/
//pref("content.notify.interval", 100000); // (.10s); alt=500000 (.50s)
/** GFX ***/
pref("gfx.canvas.accelerated.cache-items", 32768);
pref("gfx.canvas.accelerated.cache-size", 4096);
pref("gfx.content.skia-font-cache-size", 80);
/** MEDIA CACHE ***/
pref("media.memory_cache_max_size", 1048576);
pref("media.cache_readahead_limit", 9000);
pref("media.cache_resume_threshold", 3600);
pref("media.memory_caches_combined_limit_kb", 2560000);
/** IMAGE CACHE ***/
pref("image.mem.decode_bytes_at_a_time", 32768);
/** NETWORK ***/
pref("network.http.max-urgent-start-excessive-connections-per-host", 5);
pref("network.dnsCacheExpiration", 3600);
pref("network.http.max-persistent-connections-per-proxy", 48); // default=32
pref("network.websocket.max-connections", 400); // default=200
pref("network.ssl_tokens_cache_capacity", 32768);
/** MIXED CONTENT + CROSS-SITE ***/
pref("pdfjs.enableScripting", false);
pref("extensions.postDownloadThirdPartyPrompt", false);
/** EXPERIMENTAL ***/
pref("layout.css.grid-template-masonry-value.enabled", true);
pref("dom.enable_web_task_scheduling", true);
pref("dom.security.sanitizer.enabled", true);
/****************************************************************************
* SECTION: SECUREFOX *
****************************************************************************/
/** TRACKING PROTECTION ***/
pref("urlclassifier.trackingSkipURLs", "*.reddit.com, *.twitter.com, *.twimg.com, *.tiktok.com");
pref("urlclassifier.features.socialtracking.skipURLs", "*.instagram.com, *.twitter.com, *.twimg.com");
pref("network.cookie.sameSite.noneRequiresSecure", true);
pref("browser.helperApps.deleteTempFileOnExit", true);
pref("browser.uitour.enabled", false);
/** SSL / TLS ***/
pref("security.ssl.treat_unsafe_negotiation_as_broken", true);
pref("browser.xul.error_pages.expert_bad_cert", true);
pref("security.tls.enable_0rtt_data", false);
/** DISK AVOIDANCE ***/
pref("browser.privatebrowsing.forceMediaMemoryCache", true);
/** SHUTDOWN & SANITIZING ***/
pref("privacy.history.custom", true);
/** SEARCH / URL BAR ***/
pref("browser.urlbar.trimHttps", true);
pref("browser.search.separatePrivateDefault.ui.enabled", true);
pref("browser.urlbar.update2.engineAliasRefresh", true);
pref("browser.search.suggest.enabled", false);
pref("browser.urlbar.quicksuggest.enabled", false);
pref("browser.urlbar.suggest.quicksuggest.sponsored", false);
pref("browser.urlbar.suggest.quicksuggest.nonsponsored", false);
pref("browser.urlbar.groupLabels.enabled", false);
pref("browser.formfill.enable", false);
pref("security.insecure_connection_text.enabled", true);
pref("security.insecure_connection_text.pbmode.enabled", true);
pref("network.IDN_show_punycode", true);
/** CONTAINERS ***/
pref("privacy.userContext.ui.enabled", true);
/** SAFE BROWSING ***/
pref("browser.safebrowsing.downloads.remote.enabled", false);
/** TELEMETRY ***/
pref("datareporting.policy.dataSubmissionEnabled", false, locked);
pref("datareporting.healthreport.uploadEnabled", false, locked);
pref("toolkit.telemetry.unified", false, locked);
pref("toolkit.telemetry.enabled", false, locked);
pref("toolkit.telemetry.server", "data:,", locked);
pref("toolkit.telemetry.archive.enabled", false, locked);
pref("toolkit.telemetry.newProfilePing.enabled", false, locked);
pref("toolkit.telemetry.shutdownPingSender.enabled", false, locked);
pref("toolkit.telemetry.updatePing.enabled", false, locked);
pref("toolkit.telemetry.bhrPing.enabled", false, locked);
pref("toolkit.telemetry.firstShutdownPing.enabled", false, locked);
pref("toolkit.telemetry.coverage.opt-out", true, locked);
pref("toolkit.coverage.opt-out", true, locked);
pref("toolkit.coverage.endpoint.base", "", locked);
pref("browser.newtabpage.activity-stream.feeds.telemetry", false, locked);
pref("browser.newtabpage.activity-stream.telemetry", false, locked);
/** EXPERIMENTS ***/
pref("app.shield.optoutstudies.enabled", false, locked);
pref("app.normandy.enabled", false, locked);
pref("app.normandy.api_url", "", locked);
/** CRASH REPORTS ***/
pref("breakpad.reportURL", "");
pref("browser.tabs.crashReporting.sendReport", false);
pref("browser.crashReports.unsubmittedCheck.autoSubmit2", false);
/** DETECTION ***/
pref("dom.private-attribution.submission.enabled", false);
/****************************************************************************
* SECTION: PESKYFOX *
****************************************************************************/
/** MOZILLA UI ***/
pref("browser.privatebrowsing.vpnpromourl", "", locked);
pref("extensions.getAddons.showPane", false);
pref("extensions.htmlaboutaddons.recommendations.enabled", false);
pref("browser.discovery.enabled", false);
pref("browser.newtabpage.activity-stream.asrouter.userprefs.cfr.addons", false);
pref("browser.newtabpage.activity-stream.asrouter.userprefs.cfr.features", false);
pref("browser.preferences.moreFromMozilla", false);
pref("browser.aboutwelcome.enabled", false);
/** THEME ADJUSTMENTS ***/
pref("toolkit.legacyUserProfileCustomizations.stylesheets", true);
pref("browser.compactmode.show", true);
pref("browser.display.focus_ring_on_anything", true);
pref("browser.display.focus_ring_style", 0);
pref("browser.display.focus_ring_width", 0);
pref("layout.css.prefers-color-scheme.content-override", 2);
pref("browser.privateWindowSeparation.enabled", false); // WINDOWS
/** FULLSCREEN NOTICE ***/
pref("full-screen-api.transition-duration.enter", "0 0");
pref("full-screen-api.transition-duration.leave", "0 0");
pref("full-screen-api.warning.delay", -1);
pref("full-screen-api.warning.timeout", 0);
/** URL BAR ***/
pref("browser.urlbar.suggest.calculator", true);
pref("browser.urlbar.unitConversion.enabled", true);
pref("browser.urlbar.trending.featureGate", false);
/** NEW TAB PAGE ***/
pref("browser.newtabpage.activity-stream.feeds.topsites", false);
pref("browser.newtabpage.activity-stream.feeds.section.topstories", false);
/** POCKET ***/
pref("extensions.pocket.enabled", false);
/** DOWNLOADS ***/
pref("browser.download.always_ask_before_handling_new_types", true);
pref("browser.download.manager.addToRecentDocs", false);
/** PDF ***/
pref("browser.download.open_pdf_attachments_inline", true);
/** TAB BEHAVIOR ***/
pref("browser.bookmarks.openInTabClosesMenu", false);
pref("browser.menu.showViewImageInfo", true);
pref("findbar.highlightAll", true);
pref("layout.word_select.eat_space_to_next_word", false);

File diff suppressed because one or more lines are too long

View File

@@ -2,7 +2,6 @@
const lazy = {};
var ZenStartup = {
init() {
this.logHeader();
this.openWatermark();
window.SessionStore.promiseInitialized.then(() => {
this._changeSidebarLocation();
@@ -27,9 +26,12 @@
}
// Fix notification deck
document
.getElementById('zen-appcontent-navbar-container')
.appendChild(document.getElementById('tab-notification-deck-template'));
const deckTemplate = document.getElementById('tab-notification-deck-template');
if (deckTemplate) {
document
.getElementById('zen-appcontent-navbar-container')
.appendChild(deckTemplate);
}
// Disable smooth scroll
gBrowser.tabContainer.arrowScrollbox.smoothScroll = false;
@@ -104,21 +106,6 @@
gURLBar._initPasteAndGo();
gURLBar._initStripOnShare();
},
logHeader() {
console.info(`
Welcome to Zen Browser!
If you are seeing this message, it means that you have successfully opened Zen's developer console.
Here you can see all the logs and errors that Zen is generating.
If you have any questions or need help, please contact us in any media in https://zen-browser.app/
Note: This developer console is not the same as the browser console, it has access to Zen's internal functions and variables, including your passwords and other sensitive information. Please do not paste any code here unless you know what you are doing.
`);
},
};
ZenStartup.init();

View File

@@ -117,6 +117,8 @@ var gZenUIManager = {
var gZenVerticalTabsManager = {
init() {
this._multiWindowFeature = new ZenMultiWindowFeature();
ChromeUtils.defineLazyGetter(this, 'isWindowsStyledButtons', () => {
return !(window.AppConstants.platform === 'macosx' || window.matchMedia('(-moz-gtk-csd-reversed-placement)').matches
|| Services.prefs.getBoolPref('zen.view.experimental-force-window-controls-left'));
@@ -138,7 +140,7 @@ var gZenVerticalTabsManager = {
this.initRightSideOrderContextMenu();
window.addEventListener('customizationstarting', this._preCustomize.bind(this));
window.addEventListener('aftercustomization', updateEvent);
window.addEventListener('aftercustomization', this._postCustomize.bind(this));
window.addEventListener('DOMContentLoaded', updateEvent, { once: true });
@@ -209,12 +211,22 @@ var gZenVerticalTabsManager = {
return this.__actualWindowButtons;
},
_preCustomize() {
this._updateEvent({ forceMultipleToolbar: true });
async _preCustomize() {
await this._multiWindowFeature.foreachWindowAsActive(async (browser) => {
browser.gZenVerticalTabsManager._updateEvent({ forceMultipleToolbar: true, dontRebuildAreas: true });
});
this.rebuildAreas();
this.navigatorToolbox.setAttribute('zen-sidebar-expanded', 'true');
document.documentElement.setAttribute('zen-sidebar-expanded', 'true'); // force expanded sidebar
},
_postCustomize() {
// No need to use `await` here, because the customization is already done
this._multiWindowFeature.foreachWindowAsActive(async (browser) => {
browser.gZenVerticalTabsManager._updateEvent({ dontRebuildAreas: true });
});
},
initializePreferences(updateEvent) {
XPCOMUtils.defineLazyPreferenceGetter(
this,
@@ -261,7 +273,7 @@ var gZenVerticalTabsManager = {
);
},
_updateEvent({ forceMultipleToolbar = false } = {}) {
_updateEvent({ forceMultipleToolbar = false, dontRebuildAreas = false } = {}) {
if (this._isUpdating) {
return;
}
@@ -300,7 +312,7 @@ var gZenVerticalTabsManager = {
let shouldHide = false;
if (((!isRightSide && this.isWindowsStyledButtons) || (isRightSide && !this.isWindowsStyledButtons)
|| (
isCompactMode && isSingleToolbar && this.isWindowsStyledButtons && !isRightSide
isCompactMode && isSingleToolbar && this.isWindowsStyledButtons
)) && isSingleToolbar) {
appContentNavbarContaienr.setAttribute('should-hide', 'true');
shouldHide = true;
@@ -314,16 +326,8 @@ var gZenVerticalTabsManager = {
!isCompactMode
) {
this.navigatorToolbox.prepend(topButtons);
// browser.prepend(this.navigatorToolbox);
} else {
// customizationTarget.prepend(topButtons);
// tabboxWrapper.prepend(this.navigatorToolbox);
}
//if (!isVerticalTabs) {
// document.getElementById("urlbar-container").after(document.getElementById('navigator-toolbox'));
//}
let windowButtons = this.actualWindowButtons;
let doNotChangeWindowButtons = !isCompactMode && isRightSide && this.isWindowsStyledButtons;
const navBar = document.getElementById('nav-bar');
@@ -365,7 +369,9 @@ var gZenVerticalTabsManager = {
document.documentElement.removeAttribute("zen-single-toolbar");
navBar.appendChild(document.getElementById('PanelUI-button'));
this._toolbarOriginalParent.prepend(navBar);
CustomizableUI.zenInternalCU._rebuildRegisteredAreas();
if (!dontRebuildAreas) {
this.rebuildAreas();
}
}
if (isCompactMode) {
@@ -415,7 +421,7 @@ var gZenVerticalTabsManager = {
}
}
if (shouldHide && !isCompactMode) {
if (shouldHide) {
appContentNavbarContaienr.append(windowButtons);
}
@@ -429,6 +435,10 @@ var gZenVerticalTabsManager = {
this._isUpdating = false;
},
rebuildAreas() {
CustomizableUI.zenInternalCU._rebuildRegisteredAreas(/* zenDontRebuildCollapsed */ true);
},
_updateMaxWidth() {
const maxWidth = Services.prefs.getIntPref('zen.view.sidebar-expanded.max-width');
const toolbox = document.getElementById('navigator-toolbox');

View File

@@ -37,8 +37,6 @@
<script src="chrome://browser/content/zen-components/ZenWorkspaces.mjs" />
<script src="chrome://browser/content/zen-components/ZenPinnedTabsStorage.mjs" />
<script src="chrome://browser/content/zen-components/ZenPinnedTabManager.mjs" />
<script src="chrome://browser/content/zen-components/ZenWorkspacesStorage.mjs" />
<script src="chrome://browser/content/zen-components/ZenWorkspacesSync.mjs" />
<script src="chrome://browser/content/zen-components/ZenGradientGenerator.mjs" />
<script src="chrome://browser/content/zen-components/ZenViewSplitter.mjs"/>
<script src="chrome://browser/content/zen-components/ZenProfileDialogUI.mjs" />

View File

@@ -4,4 +4,6 @@
<script type="text/javascript">
Services.scriptloader.loadSubScript("chrome://browser/content/zen-components/ZenCommonUtils.mjs", this);
Services.scriptloader.loadSubScript("chrome://browser/content/zen-components/ZenKeyboardShortcuts.mjs", this);
</script>
Services.scriptloader.loadSubScript("chrome://browser/content/zen-components/ZenWorkspacesSync.mjs", this);
Services.scriptloader.loadSubScript("chrome://browser/content/zen-components/ZenWorkspacesStorage.mjs", this);
</script>

View File

@@ -18,13 +18,13 @@
:root[zen-no-padding='true'] &:not([zen-split="true"]) {
border-radius: 0 !important;
}
@media (-moz-bool-pref: 'zen.view.experimental-rounded-view') {
#tabbrowser-tabpanels {
mix-blend-mode: multiply;
-moz-osx-font-smoothing: grayscale;
isolation: isolate;
}
}
@media (-moz-bool-pref: 'zen.view.experimental-rounded-view') {
#tabbrowser-tabpanels {
mix-blend-mode: multiply;
-moz-osx-font-smoothing: grayscale;
isolation: isolate;
}
}
}

View File

@@ -83,6 +83,7 @@
#zen-appcontent-wrapper {
max-width: 100%;
min-width: 1px;
overflow-x: hidden;
z-index: 1;
}

View File

@@ -12,11 +12,20 @@
@media (-moz-bool-pref: 'zen.view.compact.hide-tabbar') or (-moz-bool-pref: 'zen.view.use-single-toolbar') {
#zen-sidebar-web-panel-wrapper:has(#zen-sidebar-web-panel[pinned='true']) {
margin-left: calc(var(--zen-sidebar-web-panel-spacing) * 2) !important;
margin-left: var(--zen-sidebar-web-panel-spacing) !important;
}
#zen-tabbox-wrapper {
/* Remove extra 1px of margine we have to add to the tabbox */
margin-left: 0 !important;
}
#zen-appcontent-wrapper {
margin-left: var(--zen-element-separation) !important;
& #tabbrowser-tabbox {
margin-left: 0 !important;
}
}
#zen-sidebar-top-buttons-customization-target {
@@ -28,36 +37,41 @@
}
#navigator-toolbox {
--zen-toolbox-max-width: 54px !important;
--zen-compact-float: calc(var(--zen-element-separation) - 1px);
position: absolute;
z-index: 10;
transition: transform 0.25s ease, opacity 0.1s ease-in-out;
top: 0;
bottom: var(--zen-element-separation);
opacity: 0;
padding-left: var(--zen-compact-float) !important;
padding-bottom: 0 !important;
padding-top: 0 !important;
--zen-toolbox-max-width: 64px !important;
--zen-compact-float: var(--zen-element-separation);
:root[zen-single-toolbar='true'] & {
top: var(--zen-element-separation);
&:not([animate='true']) {
position: absolute;
z-index: 10;
transition: left 0.25s ease, right 0.25s ease, opacity 1.5s ease;
top: 0;
bottom: var(--zen-element-separation);
opacity: 0;
padding: 0 var(--zen-compact-float) !important;
& #nav-bar {
margin-left: calc(var(--zen-toolbox-padding) / 2) !important;
:root[zen-single-toolbar='true'] & {
top: var(--zen-element-separation);
& #nav-bar {
margin-left: calc(var(--zen-toolbox-padding) / 2) !important;
}
}
}
& #urlbar[open] {
top: 0 !important;
}
}
&:not([zen-right-side='true']) #navigator-toolbox {
right: calc(100% - var(--zen-element-separation));
left: calc(-1 * var(--zen-sidebar-width) + var(--zen-element-separation));
}
/* When we have multiple toolbars and the top-toolbar is NOT being hidden,
* we need to adjust the top-padding of the toolbox to account for the
* extra toolbar height. */
@media not (-moz-bool-pref: 'zen.view.compact.hide-toolbar') {
&:not([zen-single-toolbar='true']) #navigator-toolbox {
&:not([zen-single-toolbar='true']) #navigator-toolbox:not([animate='true']) {
margin-top: var(--zen-toolbar-height) !important;
}
}
@@ -65,9 +79,10 @@
&[zen-right-side='true'] {
& #navigator-toolbox {
--zen-compact-float: calc(var(--zen-element-separation) + 1px);
padding-left: unset !important;
padding-right: var(--zen-compact-float) !important;
left: calc(100% - var(--zen-element-separation));
&:not([animate='true']) {
right: calc(-1 * var(--zen-sidebar-width) + var(--zen-element-separation));
}
}
& .browserSidebarContainer {
@@ -76,7 +91,7 @@
}
}
#titlebar {
#navigator-toolbox:not([animate='true']) #titlebar {
box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.1);
border-radius: calc(var(--zen-border-radius) - 2px);
padding: var(--zen-toolbox-padding) !important;
@@ -99,19 +114,21 @@
#navigator-toolbox:hover,
#navigator-toolbox[zen-has-hover],
#navigator-toolbox:focus-within,
#navigator-toolbox[zen-user-show],
#navigator-toolbox[flash-popup],
#navigator-toolbox[has-popup-menu],
#navigator-toolbox[movingtab],
#mainPopupSet:has(> #appMenu-popup:hover) ~ toolbox,
#navigator-toolbox:has(.tabbrowser-tab:active),
#navigator-toolbox:has(*[open='true']:not(tab):not(.zen-compact-mode-ignore)) {
opacity: 1;
#navigator-toolbox:has(*:is([open='true'], #nav-bar:focus-within):not(tab):not(.zen-compact-mode-ignore)) {
&:not([animate='true']) {
transition: left 0.25s ease, right 0.25s ease;
opacity: 1;
transform: translateX(calc(100% - var(--zen-element-separation) - 1px));
:root[zen-right-side='true'] & {
transform: translateX(calc(-100% + var(--zen-element-separation) + 1px));
left: -1px;
:root[zen-right-side='true'] & {
right: -1px;
left: auto;
}
}
}
}
@@ -156,7 +173,6 @@
width: 100%;
opacity: 0;
background: var(--zen-dialog-background);
padding-left: var(--zen-toolbox-padding) !important;
max-height: var(--zen-toolbar-height);
overflow: hidden;
@@ -170,11 +186,6 @@
transition: transform 0.1s ease-in-out;
}
:root[zen-window-buttons-reversed='true'] & {
padding-left: 0 !important;
padding-right: var(--zen-toolbox-padding) !important;
}
@media (-moz-bool-pref: 'zen.view.compact.color-toolbar') {
background-attachment: fixed;
backdrop-filter: blur(5px);
@@ -199,6 +210,10 @@
& #urlbar {
transform: translateY(0);
&[open]:not([zen-floating-urlbar='true']) {
top: 0 !important;
}
}
}
}

View File

@@ -56,7 +56,7 @@
:root[zen-right-side='true'] & {
margin-right: 0;
margin-left: calc(-1 * var(--zen-split-column-gap));
margin-left: var(--zen-element-separation);
}
}

View File

@@ -281,11 +281,17 @@
animation: better-sidebar-pinned-hide 0.15s ease-in-out forwards !important;
}
:root:not([zen-right-side='true']) {
#zen-sidebar-web-panel-wrapper:not(:has(#zen-sidebar-web-panel:is([hidden='true'], [pinned='true']))) {
margin-left: 0 !important;
#zen-sidebar-web-panel-wrapper:has(#zen-sidebar-web-panel:not([hidden='true'])) {
:root:not([zen-right-side='true']) & {
margin-right: calc(var(--zen-element-separation) * 2 - 3px) !important;
}
@media (-moz-bool-pref: 'zen.view.compact') and (-moz-bool-pref: 'zen.view.compact.hide-tabbar') {
:root[zen-right-side='true'] & {
margin-left: 0 !important;
margin-right: calc(var(--zen-element-separation) * 2 - 3px) !important;
}
}
}
/** UNPINNED **/

View File

@@ -2,28 +2,32 @@ height: var(--zen-toolbar-height);
@media (-moz-bool-pref: 'zen.view.hide-window-controls') {
& {
transition: height 0.2s ease, opacity 0.2s ease-out;
transition-delay: 0.05s;
transition: height 0.15s ease, opacity 0.1s ease-out;
transition-delay: 0.2s;
& > * {
transition: transform 0.2s ease-out;
transition: opacity 0.2s ease-out;
transition-delay: 0.2s;
}
}
&:not([zen-has-hover='true']):not([has-popup-menu]):not(:focus-within) {
transition-delay: 0.2s;
height: var(--zen-element-separation);
overflow: hidden;
opacity: 0;
& > * {
transform: translateY(-100%);
opacity: 0;
pointer-events: none;
}
}
}
:root[inDOMFullscreen='true'] & {
max-height: 0;
min-height: unset !important;
opacity: 0;
pointer-events: none;
@media (-moz-bool-pref: 'zen.view.experimental-no-window-controls') {
&:has(#PersonalToolbar[collapsed='true']) {
max-height: 0 !important;
overflow: hidden;
opacity: 0 !important;
pointer-events: none !important;
}
}
}

View File

@@ -0,0 +1,8 @@
& #zen-sidebar-top-buttons:has(#zen-sidebar-top-buttons-customization-target:empty) {
max-height: 0 !important;
min-height: 0 !important;
opacity: 0;
overflow: hidden;
pointer-events: none;
}

View File

@@ -166,6 +166,13 @@
&[should-hide='true'] {
%include vertical-tabs-topbar.inc.css
}
:root[inDOMFullscreen='true'] & {
max-height: 0 !important;
min-height: unset !important;
opacity: 0 !important;
pointer-events: none !important;
}
}
}
@@ -224,14 +231,14 @@
}
& .tabbrowser-tab {
transition: scale 0.1s ease-in-out;
transition: scale 0.07s ease;
&[fadein='true']:not([zen-essential='true']) {
#tabbrowser-tabs[zen-workspace-animation='previous'] & {
animation: zen-slide-in 0.2s ease-in-out;
animation: zen-slide-in 0.2s ease;
}
#tabbrowser-tabs[zen-workspace-animation='next'] & {
animation: zen-slide-in-reverse 0.2s ease-in-out;
animation: zen-slide-in-reverse 0.2s ease;
}
}
@@ -372,7 +379,6 @@
:root[zen-single-toolbar='true'] & {
margin-left: var(--zen-toolbox-padding);
width: calc(100% - var(--zen-toolbox-padding));
& #urlbar:not([breakout-extend='true']) .urlbar-input-container {
padding-left: 4px;
padding-right: 4px;
@@ -380,7 +386,6 @@
:root[zen-right-side='true'] & {
margin-left: 0;
margin-right: var(--zen-toolbox-padding);
}
}
}
@@ -681,7 +686,8 @@
/* Mark: Separator styling */
#zen-sidebar-splitter {
opacity: 0;
width: var(--zen-toolbox-padding);
max-width: var(--zen-toolbox-padding) !important;
min-width: var(--zen-toolbox-padding) !important;
height: 100%;
transition: opacity 0.2s ease-in-out;
background: var(--zen-colors-border);
@@ -939,7 +945,7 @@
@media not (-moz-bool-pref: 'zen.view.compact') {
:root[zen-right-side='true']:not([zen-sidebar-expanded='true']):not([zen-window-buttons-reversed='true']) {
& #navigator-toolbox {
padding-top: var(--zen-toolbar-height);
margin-top: var(--zen-toolbar-height) !important;
}
& .titlebar-buttonbox-container {
@@ -957,11 +963,13 @@
& #zen-appcontent-navbar-container {
padding-left: var(--zen-element-separation);
}
%include vertical-tabs-topbuttons-fix.css
}
:root:not([zen-right-side='true']):not([zen-sidebar-expanded='true'])[zen-window-buttons-reversed='true'] {
& #navigator-toolbox {
padding-top: var(--zen-toolbar-height);
margin-top: var(--zen-toolbar-height) !important;
}
& .titlebar-buttonbox-container {
@@ -979,5 +987,7 @@
& #zen-appcontent-navbar-container {
padding-right: var(--zen-element-separation);
}
%include vertical-tabs-topbuttons-fix.css
}
}

View File

@@ -17,7 +17,7 @@
/* Branding */
--zen-branding-dark: #202020;
--zen-branding-coral: #F76F53;
--zen-branding-paper: #F2F0E3;
--zen-branding-paper: #ebebeb;
--zen-branding-bg: light-dark(var(--zen-branding-paper), var(--zen-branding-dark));
--zen-branding-bg-reverse: light-dark(var(--zen-branding-dark), var(--zen-branding-paper));
@@ -76,6 +76,9 @@
--color-accent-primary-hover: var(--button-primary-hover-bgcolor) !important;
--color-accent-primary-active: var(--button-primary-active-bgcolor) !important;
--link-color: var(--zen-branding-bg-reverse) !important;
--link-color-hover: var(--zen-branding-bg-reverse) !important;
--in-content-page-background: var(--zen-colors-tertiary) !important;
--zen-in-content-dialog-background: var(--zen-colors-tertiary);

View File

@@ -124,6 +124,10 @@
transition: all 0.2s;
}
#identity-permission-box > *:not(#permissions-granted-icon) {
visibility: collapse;
}
#urlbar[open] :is(#tracking-protection-icon-container, .urlbar-page-action),
#urlbar:hover :is(#tracking-protection-icon-container, .urlbar-page-action),
.urlbar-page-action[open],
@@ -134,7 +138,7 @@
#identity-permission-box:not([open]),
#notification-popup-box:not([open]) {
margin-inline-start: calc(-16px - 2 * var(--urlbar-icon-padding));
margin-inline-start: calc(-10px - 2 * var(--urlbar-icon-padding));
opacity: 0;
transition: all 0.2s;
}
@@ -302,8 +306,18 @@ button.popup-notification-dropmarker {
align-items: center;
}
:root:not([zen-single-toolbar='true']) #nav-bar {
margin-bottom: -1px;
:root:not([zen-single-toolbar='true']) {
& #nav-bar {
margin-bottom: -1px;
}
&[zen-right-side='true']:not([zen-window-buttons-reversed='true']) #nav-bar {
margin-inline-start: var(--zen-element-separation);
}
&:not([zen-right-side='true'])[zen-window-buttons-reversed='true'] #nav-bar {
margin-inline-end: var(--zen-element-separation);
}
}
/* Other small tweaks */
@@ -338,20 +352,31 @@ button.popup-notification-dropmarker {
}
#urlbar[open] {
--urlbar-margin-inline: 5px !important;
& #identity-box {
margin-right: var(--urlbar-margin-inline);
}
& #urlbar-background {
/* We cant have a transparent background with a backdrop-filter because on normal websites,
the backdrop woudn't work, we would need to apply a clip-path to the site and that's not recommended
due to performance issues */
background-color: var(--zen-branding-bg) !important;
box-shadow: 0 0 1px 1px rgba(0, 0, 0, 0.1) !important;
background-color: light-dark(rgb(247, 247, 247), var(--zen-branding-bg)) !important;
box-shadow: 0 0 1px 1px light-dark(rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.1)) !important;
outline: 1px solid light-dark(rgba(20, 20, 20, 0.2), rgba(235, 235, 235, 0.2)) !important;
outline-offset: -1px !important;
}
}
:root[zen-single-toolbar='true'] #urlbar[open] {
min-width: 30vw;
:root[zen-single-toolbar='true'] {
#urlbar[open] {
min-width: 30vw;
}
&[zen-right-side='true'] #urlbar[open]:not([zen-floating-urlbar='true']) {
right: 0;
}
}
#urlbar[open][zen-floating-urlbar='true'] {
@@ -361,18 +386,17 @@ button.popup-notification-dropmarker {
font-size: 1.1em;
--urlbar-container-height: 55px !important;
--urlbar-margin-inline: 10px !important;
& #identity-box {
margin-right: var(--urlbar-margin-inline);
}
:root[zen-right-side='true'] & {
right: 0;
}
position: absolute;
top: calc(var(--zen-toolbar-height) * 2) !important;
left: 28vw;
:root[zen-right-side='true'] & {
right: 28vw !important;
}
:root:not([zen-right-side='true']) & {
left: 28vw !important;
}
#urlbar-container:has(&) {
border-radius: 10px;

View File

@@ -437,7 +437,7 @@
}
}
@media not (-moz-bool-pref: 'zen.workspaces.show-workspace-indicator') {
@media (not (-moz-bool-pref: 'zen.workspaces.show-workspace-indicator')) or (not (-moz-bool-pref: 'zen.workspaces.enabled')) {
#zen-current-workspace-indicator {
display: none !important;
}

View File

@@ -22,12 +22,16 @@ class ZenMultiWindowFeature {
return Services.wm.getMostRecentWindow('navigator:browser');
}
isActiveWindow() {
static get isActiveWindow() {
return ZenMultiWindowFeature.currentBrowser === window;
}
windowIsActive(browser) {
return browser === ZenMultiWindowFeature.currentBrowser;
}
async foreachWindowAsActive(callback) {
if (!this.isActiveWindow()) {
if (!ZenMultiWindowFeature.isActiveWindow) {
return;
}
for (const browser of ZenMultiWindowFeature.browsers) {
@@ -53,3 +57,27 @@ class ZenPreloadedFeature {
document.addEventListener('MozBeforeInitialXULLayout', initBound, { once: true });
}
}
var gZenCommonActions = {
copyCurrentURLToClipboard() {
const currentUrl = gBrowser.currentURI.spec;
if (currentUrl) {
let str = Cc["@mozilla.org/supports-string;1"].createInstance(
Ci.nsISupportsString
);
str.data = currentUrl;
let transferable = Cc[
"@mozilla.org/widget/transferable;1"
].createInstance(Ci.nsITransferable);
transferable.init(getLoadContext());
transferable.addDataFlavor("text/plain");
transferable.setTransferData("text/plain", str);
Services.clipboard.setData(
transferable,
null,
Ci.nsIClipboard.kGlobalClipboard
);
ConfirmationHint.show(document.getElementById("PanelUI-menu-button"), "zen-copy-current-url-confirmation");
}
}
};

View File

@@ -17,6 +17,8 @@ var gZenCompactModeManager = {
Services.prefs.addObserver('zen.view.sidebar-expanded.on-hover', this._disableTabsOnHoverIfConflict.bind(this));
Services.prefs.addObserver('zen.tabs.vertical.right-side', this._updateSidebarIsOnRight.bind(this));
this._canAnimateSidebar = Services.prefs.getBoolPref('zen.view.compact.animate-sidebar', true);
gZenUIManager.addPopupTrackingAttribute(this.sidebar);
gZenUIManager.addPopupTrackingAttribute(document.getElementById('zen-appcontent-navbar-container'));
@@ -65,6 +67,8 @@ var gZenCompactModeManager = {
},
updateCompactModeContext(isSingleToolbar) {
this.getAndApplySidebarWidth(); // Ignore return value
const IDs = ['zen-context-menu-compact-mode-hide-sidebar', 'zen-context-menu-compact-mode-hide-toolbar', 'zen-context-menu-compact-mode-hide-both'];
for (let id of IDs) {
document.getElementById(id).disabled = isSingleToolbar;
@@ -97,6 +101,14 @@ var gZenCompactModeManager = {
this.animateCompactMode();
},
getAndApplySidebarWidth() {
let sidebarWidth = this.sidebar.getBoundingClientRect().width;
if (sidebarWidth > 1) {
this.sidebar.style.setProperty("--zen-sidebar-width", `${sidebarWidth}px`);
}
return sidebarWidth;
},
animateCompactMode() {
const isCompactMode = this.prefefence;
const canHideSidebar = Services.prefs.getBoolPref('zen.view.compact.hide-tabbar');
@@ -104,79 +116,90 @@ var gZenCompactModeManager = {
return;
}
this._isAnimating = true;
let sidebarWidth = this.sidebar.getBoundingClientRect().width;
if (sidebarWidth < 300) {
sidebarWidth += sidebarWidth < 210 ? 9 : 11; // Bug: IF sidebar is too small, it will not animate properly
}
if (canHideSidebar && isCompactMode) {
this.sidebar.style.position = "relative";
this.sidebar.style.transition = "margin .3s ease, opacity .3s ease";
this.sidebar.style.left = "0";
this.sidebar.style.setProperty("opacity", "1", "important");
if (!this.sidebarIsOnRight) {
this.sidebar.style.marginLeft = `${-1 * sidebarWidth}px`;
} else {
this.sidebar.style.marginRight = `${-1 * sidebarWidth}px`;
// Do this so we can get the correct width ONCE compact mode styled have been applied
this.sidebar.setAttribute("animate", "true");
window.requestAnimationFrame(() => {
let sidebarWidth = this.getAndApplySidebarWidth();
if (!this._canAnimateSidebar) {
this.sidebar.removeAttribute("animate");
this._isAnimating = false;
return;
}
this.sidebar.style.pointerEvents = "none";
if (canHideSidebar && isCompactMode) {
window.requestAnimationFrame(() => {
this.sidebar.style.position = "unset";
this.sidebar.style.transition = "margin .4s ease";
this.sidebar.style.left = "0";
if (!this.sidebarIsOnRight) {
this.sidebar.style.marginLeft = `${-1 * sidebarWidth}px`;
} else {
this.sidebar.style.marginRight = `${-1 * sidebarWidth}px`;
}
this.sidebar.style.pointerEvents = "none";
window.requestAnimationFrame(() => {
this.sidebar.style.removeProperty("opacity");
setTimeout(() => {
window.requestAnimationFrame(() => {
this._isAnimating = false;
this.sidebar.style.removeProperty("opacity");
this.sidebar.style.removeProperty("position");
this.sidebar.style.removeProperty("transition");
this.sidebar.style.removeProperty("pointer-events");
this.sidebar.style.removeProperty("margin-left");
this.sidebar.style.removeProperty("margin-right");
this.sidebar.style.removeProperty("transform");
this.sidebar.style.removeProperty("left");
document.getElementById('browser').style.removeProperty("overflow");
setTimeout(() => {
window.requestAnimationFrame(() => {
this.sidebar.style.removeProperty("pointer-events");
this.sidebar.style.removeProperty("position");
this.sidebar.style.removeProperty("margin-left");
this.sidebar.style.removeProperty("margin-right");
this.sidebar.style.removeProperty("transform");
this.sidebar.style.removeProperty("left");
document.getElementById('browser').style.removeProperty("overflow");
this.sidebar.removeAttribute("animate");
window.requestAnimationFrame(() => {
this.sidebar.style.removeProperty("transition");
this._isAnimating = false;
});
});
}, 450);
});
}, 400);
});
} else if (canHideSidebar && !isCompactMode) {
document.getElementById('browser').style.overflow = "hidden";
this.sidebar.style.position = "relative";
this.sidebar.style.left = "0";
});
} else if (canHideSidebar && !isCompactMode) {
document.getElementById('browser').style.overflow = "hidden";
this.sidebar.style.position = "relative";
this.sidebar.style.left = "0";
if (!this.sidebarIsOnRight) {
this.sidebar.style.marginLeft = `${-1 * sidebarWidth}px`;
} else {
this.sidebar.style.marginRight = `${-1 * sidebarWidth}px`;
this.sidebar.style.transform = `translateX(${sidebarWidth}px)`;
}
window.requestAnimationFrame(() => {
this.sidebar.style.transition = "margin .3s ease, transform .4s ease, opacity .3s ease";
// we are in compact mode and we are exiting it
if (!this.sidebarIsOnRight) {
this.sidebar.style.marginLeft = "0";
this.sidebar.style.marginLeft = `${-1 * sidebarWidth}px`;
} else {
this.sidebar.style.marginRight = "0";
this.sidebar.style.transform = "translateX(0)";
this.sidebar.style.marginRight = `${-1 * sidebarWidth}px`;
this.sidebar.style.transform = `translateX(${sidebarWidth}px)`;
}
this.sidebar.style.pointerEvents = "none";
setTimeout(() => {
window.requestAnimationFrame(() => {
this._isAnimating = false;
this.sidebar.style.removeProperty("position");
this.sidebar.style.removeProperty("pointer-events");
this.sidebar.style.removeProperty("opacity");
this.sidebar.style.removeProperty("margin-left");
this.sidebar.style.removeProperty("margin-right");
this.sidebar.style.removeProperty("transform");
this.sidebar.style.removeProperty("transition");
this.sidebar.style.removeProperty("left");
window.requestAnimationFrame(() => {
this.sidebar.style.transition = "margin .3s ease, transform .275s ease, opacity .3s ease";
// we are in compact mode and we are exiting it
if (!this.sidebarIsOnRight) {
this.sidebar.style.marginLeft = "0";
} else {
this.sidebar.style.marginRight = "0";
this.sidebar.style.transform = "translateX(0)";
}
this.sidebar.style.pointerEvents = "none";
document.getElementById('browser').style.removeProperty("overflow");
});
}, 400);
});
}
setTimeout(() => {
window.requestAnimationFrame(() => {
this._isAnimating = false;
this.sidebar.style.removeProperty("position");
this.sidebar.style.removeProperty("pointer-events");
this.sidebar.style.removeProperty("opacity");
this.sidebar.style.removeProperty("margin-left");
this.sidebar.style.removeProperty("margin-right");
this.sidebar.style.removeProperty("transform");
this.sidebar.style.removeProperty("transition");
this.sidebar.style.removeProperty("left");
document.getElementById('browser').style.removeProperty("overflow");
this.sidebar.removeAttribute("animate");
});
}, 400);
});
} else {
this.sidebar.removeAttribute("animate"); // remove the attribute if we are not animating
}
});
},
updateContextMenu() {

View File

@@ -92,7 +92,6 @@
this.initContextMenu();
this.initThemePicker();
this._hasInitialized = true;
this.onDarkModeChange(null);
}
@@ -246,9 +245,7 @@
onThemePickerClick(event) {
event.preventDefault();
if (event.button !== 0 || this.dragging ) return;
const gradient = this.panel.querySelector('.zen-theme-picker-gradient');
const rect = gradient.getBoundingClientRect();
const padding = 90; // each side
@@ -275,7 +272,6 @@
const relativeX = event.clientX - rect.left;
const relativeY = event.clientY - rect.top;
const color = this.getColorFromPosition(relativeX, relativeY);
// Create new dot
@@ -358,7 +354,6 @@
listItems.querySelector('.zen-theme-picker-dot-custom').style.setProperty('--zen-theme-picker-dot-color', color);
listItems.querySelector('.zen-theme-picker-custom-list-item-label').textContent = color;
this.customColorList.appendChild(listItems);
}
@@ -366,11 +361,9 @@
const color = this.customColorInput.value;
if (!color) {
return;
}
// can be any color format, we just add it to the list as a dot, but hidden
const dot = document.createElement('div');
dot.classList.add('zen-theme-picker-dot', 'hidden', 'custom');
@@ -381,8 +374,6 @@
await this.updateCurrentWorkspace();
}
onThemePickerClick(event) {
event.preventDefault();
@@ -404,11 +395,9 @@
return;
}
const clickedElement = event.target;
const isExistingDot = clickedElement.classList.contains('zen-theme-picker-dot');
if (!isExistingDot && this.numberOfDots < ZenThemePicker.MAX_DOTS) {
const relativeX = event.clientX - rect.left;
const relativeY = event.clientY - rect.top;
@@ -497,11 +486,17 @@
this.updateCurrentWorkspace();
}
getToolbarModifiedBase() {
return this.isDarkMode ?
'color-mix(in srgb, var(--zen-themed-toolbar-bg) 80%, #fff 20%)'
: 'color-mix(in srgb, var(--zen-themed-toolbar-bg) 95%, #000 5%)';
}
getSingleRGBColor(color, forToolbar = false) {
if (color.isCustom) {
return color.c;
}
const toolbarBg = forToolbar ? 'var(--zen-themed-toolbar-bg)' : 'var(--zen-themed-toolbar-bg-transparent)';
const toolbarBg = forToolbar ? this.getToolbarModifiedBase() : 'var(--zen-themed-toolbar-bg-transparent)';
return `color-mix(in srgb, rgb(${color.c[0]}, ${color.c[1]}, ${color.c[2]}) ${this.currentOpacity * 100}%, ${toolbarBg} ${(1 - this.currentOpacity) * 100}%)`;
}
@@ -515,10 +510,10 @@
return `linear-gradient(${this.currentRotation}deg, ${themedColors.map(color => this.getSingleRGBColor(color, forToolbar)).join(', ')})`;
}
getTheme(colors, opacity = 0.5, rotation = 45, texture = 0) {
static getTheme(colors = [], opacity = 0.5, rotation = 45, texture = 0) {
return {
type: 'gradient',
gradientColors: colors.filter(color => color), // remove undefined
gradientColors: colors ? colors.filter(color => color) : [], // remove undefined
opacity,
rotation,
texture,
@@ -662,8 +657,8 @@
}
}
browser.document.documentElement.style.setProperty('--zen-main-browser-background', gradient);
browser.document.documentElement.style.setProperty('--zen-main-browser-background-toolbar', gradientToolbar);
browser.document.documentElement.style.setProperty('--zen-main-browser-background', gradient);
const dominantColor = this.getMostDominantColor(workspaceTheme.gradientColors);
if (dominantColor) {
@@ -717,7 +712,7 @@
const isCustom = dot.classList.contains('custom');
return {c: isCustom ? color : color.match(/\d+/g).map(Number), isCustom};
});
const gradient = this.getTheme(colors, this.currentOpacity, this.currentRotation, this.currentTexture);
const gradient = ZenThemePicker.getTheme(colors, this.currentOpacity, this.currentRotation, this.currentTexture);
let currentWorkspace = await ZenWorkspaces.getActiveWorkspace();
if(!skipSave) {

View File

@@ -11,6 +11,18 @@ const KEYCODE_MAP = {
F10: 'VK_F10',
F11: 'VK_F11',
F12: 'VK_F12',
F13: 'VK_F13',
F14: 'VK_F14',
F15: 'VK_F15',
F16: 'VK_F16',
F17: 'VK_F17',
F18: 'VK_F18',
F19: 'VK_F19',
F20: 'VK_F20',
F21: 'VK_F21',
F22: 'VK_F22',
F23: 'VK_F23',
F24: 'VK_F24',
TAB: 'VK_TAB',
ENTER: 'VK_RETURN',
ESCAPE: 'VK_ESCAPE',
@@ -22,6 +34,8 @@ const KEYCODE_MAP = {
DELETE: 'VK_DELETE',
BACKSPACE: 'VK_BACK',
HOME: 'VK_HOME',
NUM_LOCK: 'VK_NUMLOCK',
SCROLL_LOCK: 'VK_SCROLL',
};
const defaultKeyboardGroups = {
@@ -66,6 +80,7 @@ const defaultKeyboardGroups = {
'zen-search-find-again-shortcut-prev',
],
pageOperations: [
'zen-text-action-copy-url-shortcut',
'zen-location-open-shortcut',
'zen-location-open-shortcut-alt',
'zen-save-page-shortcut',
@@ -537,7 +552,7 @@ class ZenKeyboardShortcutsLoader {
} catch (e) {
// Recreate shortcuts file
Services.prefs.clearUserPref('zen.keyboard.shortcuts.version');
console.error('Error loading shortcuts file', e);
console.warn('Error loading shortcuts file', e);
return null;
}
}
@@ -556,7 +571,6 @@ function zenGetDefaultShortcuts() {
// For adding new default shortcuts, add them to inside the migration function
// and increment the version number.
console.info('Zen CKS: Loading default shortcuts...');
let keySet = document.getElementById(ZEN_MAIN_KEYSET_ID);
let newShortcutList = [];
@@ -702,7 +716,7 @@ function zenGetDefaultShortcuts() {
}
class ZenKeyboardShortcutsVersioner {
static LATEST_KBS_VERSION = 5;
static LATEST_KBS_VERSION = 6;
constructor() {}
@@ -822,6 +836,21 @@ class ZenKeyboardShortcutsVersioner {
)
);
}
if (version < 6) {
// Migrate from 5 to 6
// In this new version, we add the "Copy URL" shortcut to the default shortcuts
data.push(
new KeyShortcut(
'zen-copy-url',
'C',
'',
ZEN_OTHER_SHORTCUTS_GROUP,
KeyShortcutModifiers.fromObject({ accel: true, shift: true }),
'code:gZenCommonActions.copyCurrentURLToClipboard()',
'zen-text-action-copy-url-shortcut'
)
);
}
return data;
}
}
@@ -941,7 +970,6 @@ var gZenKeyboardShortcutsManager = {
}
mainKeyset.after(keyset);
console.debug('Shortcuts applied...');
}
},

View File

@@ -2,7 +2,7 @@
const lazy = {};
class ZenPinnedTabsObserver {
static ALL_EVENTS = ['TabPinned', 'TabUnpinned'];
static ALL_EVENTS = ['TabPinned', 'TabUnpinned', 'TabMove'];
#listeners = [];
@@ -49,7 +49,6 @@
this._zenClickEventListener = this._onTabClick.bind(this);
ZenWorkspaces.addChangeListeners(this.onWorkspaceChange.bind(this));
}
async onWorkspaceChange(newWorkspace, onInit) {
@@ -72,9 +71,6 @@
}
async _refreshPinnedTabs(currentWorkspace,{ init = false } = {}) {
if(init) {
await ZenPinnedTabsStorage.init();
}
await this._initializePinsCache();
await this._initializePinnedTabs(init,currentWorkspace);
}
@@ -87,7 +83,7 @@
// Enhance pins with favicons
const enhancedPins = await Promise.all(pins.map(async pin => {
try {
const image = await this.getFaviconAsBase64(pin.url);
const image = await this.getFaviconAsBase64(Services.io.newURI(pin.url).spec);
return {
...pin,
iconUrl: image || null
@@ -271,12 +267,35 @@
delete tab._zenClickEventListener;
}
break;
case "TabMove":
this._onTabMove(tab);
break;
default:
console.warn('ZenPinnedTabManager: Unhandled tab event', action);
break;
}
}
async _onTabMove(tab) {
if (!tab.pinned) {
return;
}
// Recollect pinned tabs and essentials after a tab move
const currentWorkspace = await ZenWorkspaces.getActiveWorkspace();
tab.position = tab._tPos;
for (let otherTab of gBrowser.tabs) {
if (otherTab.pinned && otherTab._tPos > tab.position) {
otherTab.position = otherTab._tPos;
await ZenPinnedTabsStorage.savePin(otherTab, false);
}
}
await ZenPinnedTabsStorage.savePin(tab);
}
_onTabClick(e) {
const tab = e.target?.closest("tab");
if (e.button === 1 && tab) {
@@ -361,7 +380,8 @@
}
async _removePinnedAttributes(tab, isClosing = false) {
if(!tab.getAttribute("zen-pin-id")) {
if(!tab.getAttribute("zen-pin-id") || this._temporarilyUnpiningEssential) {
this._temporarilyUnpiningEssential = false;
return;
}
@@ -493,7 +513,7 @@
return `data:${faviconData.mimeType};base64,${base64String}`;
} catch (ex) {
// console.error("Failed to get favicon:", ex);
return null;
return `page-icon:${pageUrl}`; // Use this as a fallback
}
}
@@ -506,6 +526,7 @@
tab.removeAttribute("zen-workspace-id");
}
if (tab.pinned) {
this._temporarilyUnpiningEssential = true;
gBrowser.unpinTab(tab);
}
gBrowser.pinTab(tab);

View File

@@ -1,6 +1,5 @@
var ZenPinnedTabsStorage = {
async init() {
console.log('ZenPinnedTabsStorage: Initializing...');
await this._ensureTable();
},
@@ -337,3 +336,5 @@ var ZenPinnedTabsStorage = {
});
}
};
ZenPinnedTabsStorage.init();

View File

@@ -252,7 +252,7 @@
if (
(tab.pinned && !ignoreTimestamp) ||
tab.selected ||
tab.multiselected ||
(tab.multiselected && !ignoreTimestamp) ||
tab.hasAttribute('busy') ||
tab.hasAttribute('pending') ||
!tab.linkedPanel ||

View File

@@ -53,11 +53,9 @@ var gZenStylesheetManager = {
var gZenThemesImporter = new (class {
constructor() {
console.info('[ZenThemesImporter]: Initializing Zen Themes Importer');
try {
window.SessionStore.promiseInitialized.then(async () => {
if (Services.prefs.getBoolPref('zen.themes.disable-all', false)) {
if (Services.prefs.getBoolPref('zen.themes.disable-all', false) || Services.appinfo.inSafeMode) {
console.log('[ZenThemesImporter]: Disabling all themes.');
return;
}

View File

@@ -34,7 +34,12 @@ var ZenWorkspaces = new (class extends ZenMultiWindowFeature {
'activationMethod',
'zen.workspaces.scroll-modifier-key',
'ctrl',
this._expandWorkspacesStrip.bind(this)
);
XPCOMUtils.defineLazyPreferenceGetter(
this,
'naturalScroll',
'zen.workspaces.natural-scroll',
true
);
XPCOMUtils.defineLazyPreferenceGetter(
this,
@@ -69,10 +74,13 @@ var ZenWorkspaces = new (class extends ZenMultiWindowFeature {
);
ChromeUtils.defineLazyGetter(this, 'tabContainer', () => document.getElementById('tabbrowser-tabs'));
this._activeWorkspace = Services.prefs.getStringPref('zen.workspaces.active', '');
await ZenWorkspacesStorage.init();
this._delayedStartup();
}
async _delayedStartup() {
if (!this.workspaceEnabled) {
return;
}
await this.initializeWorkspaces();
console.info('ZenWorkspaces: ZenWorkspaces initialized');
@@ -171,7 +179,10 @@ var ZenWorkspaces = new (class extends ZenMultiWindowFeature {
if (Math.abs(delta) < scrollThreshold) return;
// Determine scroll direction
const direction = delta > 0 ? -1 : 1;
let direction = delta > 0 ? 1 : -1;
if (this.naturalScroll) {
direction = delta > 0 ? -1 : 1;
}
// Workspace logic
const workspaces = (await this._workspaces()).workspaces;
@@ -255,7 +266,10 @@ var ZenWorkspaces = new (class extends ZenMultiWindowFeature {
// Determine swipe direction based on cumulative delta
if (Math.abs(this._swipeState.cumulativeDelta) > 0.25) {
this._swipeState.direction = this._swipeState.cumulativeDelta > 0 ? 'right' : 'left';
this._swipeState.direction = this._swipeState.cumulativeDelta > 0 ? 'left' : 'right';
if (this.naturalScroll){
this._swipeState.direction = this._swipeState.cumulativeDelta > 0 ? 'right' : 'left';
}
}
}
@@ -426,10 +440,11 @@ var ZenWorkspaces = new (class extends ZenMultiWindowFeature {
window.addEventListener('TabBrowserInserted', this.onTabBrowserInserted.bind(this));
await SessionStore.promiseInitialized;
let workspaces = await this._workspaces();
let activeWorkspace = null;
if (workspaces.workspaces.length === 0) {
await this.createAndSaveWorkspace('Default Workspace', true, '🏠');
activeWorkspace = await this.createAndSaveWorkspace('Default Workspace', true, '🏠');
} else {
let activeWorkspace = await this.getActiveWorkspace();
activeWorkspace = await this.getActiveWorkspace();
if (!activeWorkspace) {
activeWorkspace = workspaces.workspaces.find((workspace) => workspace.default);
this.activeWorkspace = activeWorkspace.uuid;
@@ -441,7 +456,9 @@ var ZenWorkspaces = new (class extends ZenMultiWindowFeature {
await this.changeWorkspace(activeWorkspace, true);
}
try {
window.gZenThemePicker = new ZenThemePicker();
if (activeWorkspace) {
window.gZenThemePicker = new ZenThemePicker();
}
} catch (e) {
console.error('ZenWorkspaces: Error initializing theme picker', e);
}
@@ -789,9 +806,14 @@ var ZenWorkspaces = new (class extends ZenMultiWindowFeature {
if (workspace.default) {
element.setAttribute('default', 'true');
}
const containerGroup = browser.ContextualIdentityService.getPublicIdentities().find(
(container) => container.userContextId === workspace.containerTabId
);
let containerGroup = undefined;
try {
containerGroup = browser.ContextualIdentityService.getPublicIdentities().find(
(container) => container.userContextId === workspace.containerTabId
);
} catch (e) {
console.warn('ZenWorkspaces: Error setting container color', e);
}
if (containerGroup) {
element.classList.add('identity-color-' + containerGroup.color);
element.setAttribute('data-usercontextid', containerGroup.userContextId);
@@ -799,7 +821,6 @@ var ZenWorkspaces = new (class extends ZenMultiWindowFeature {
if (this.isReorderModeOn(browser)) {
element.setAttribute('draggable', 'true');
}
element.addEventListener(
'dragstart',
function (event) {
@@ -1557,6 +1578,7 @@ var ZenWorkspaces = new (class extends ZenMultiWindowFeature {
default: isDefault,
icon: icon,
name: name,
theme: ZenThemePicker.getTheme([]),
};
this._prepareNewWorkspace(window);
return window;
@@ -1569,6 +1591,7 @@ var ZenWorkspaces = new (class extends ZenMultiWindowFeature {
let workspaceData = this._createWorkspaceData(name, isDefault, icon);
await this.saveWorkspace(workspaceData);
await this.changeWorkspace(workspaceData);
return workspaceData;
}
async onTabBrowserInserted(event) {
@@ -1596,6 +1619,9 @@ var ZenWorkspaces = new (class extends ZenMultiWindowFeature {
const isEssential = tab.getAttribute("zen-essential") === "true";
if (!isEssential) {
const activeWorkspace = await parent.ZenWorkspaces.getActiveWorkspace();
if (!activeWorkspace) {
return;
}
// Only update last selected tab for non-essential tabs in their workspace
if (!isEssential && workspaceID === activeWorkspace.uuid) {
@@ -1717,6 +1743,7 @@ var ZenWorkspaces = new (class extends ZenMultiWindowFeature {
async changeTabWorkspace(workspaceID) {
const tabs = TabContextMenu.contextTab.multiselected ? gBrowser.selectedTabs : [TabContextMenu.contextTab];
document.getElementById('tabContextMenu').hidePopup();
const previousWorkspaceID = document.documentElement.getAttribute('zen-workspace-id');
for (let tab of tabs) {
tab.setAttribute('zen-workspace-id', workspaceID);

View File

@@ -1,13 +1,17 @@
var ZenWorkspacesStorage = {
lazy: {},
async init() {
console.log('ZenWorkspacesStorage: Initializing...');
ChromeUtils.defineESModuleGetters(this.lazy, {
PlacesUtils: "resource://gre/modules/PlacesUtils.sys.mjs",
});
await this._ensureTable();
await ZenWorkspaceBookmarksStorage.init();
ZenWorkspaces._delayedStartup();
},
async _ensureTable() {
await PlacesUtils.withConnectionWrapper('ZenWorkspacesStorage._ensureTable', async (db) => {
await this.lazy.PlacesUtils.withConnectionWrapper('ZenWorkspacesStorage._ensureTable', async (db) => {
// Create the main workspaces table if it doesn't exist
await db.execute(`
CREATE TABLE IF NOT EXISTS zen_workspaces (
@@ -100,7 +104,7 @@ var ZenWorkspacesStorage = {
async saveWorkspace(workspace, notifyObservers = true) {
const changedUUIDs = new Set();
await PlacesUtils.withConnectionWrapper('ZenWorkspacesStorage.saveWorkspace', async (db) => {
await this.lazy.PlacesUtils.withConnectionWrapper('ZenWorkspacesStorage.saveWorkspace', async (db) => {
await db.executeTransaction(async () => {
const now = Date.now();
@@ -171,7 +175,7 @@ var ZenWorkspacesStorage = {
},
async getWorkspaces() {
const db = await PlacesUtils.promiseDBConnection();
const db = await this.lazy.PlacesUtils.promiseDBConnection();
const rows = await db.executeCached(`
SELECT * FROM zen_workspaces ORDER BY created_at ASC
`);
@@ -195,7 +199,7 @@ var ZenWorkspacesStorage = {
async removeWorkspace(uuid, notifyObservers = true) {
const changedUUIDs = [uuid];
await PlacesUtils.withConnectionWrapper('ZenWorkspacesStorage.removeWorkspace', async (db) => {
await this.lazy.PlacesUtils.withConnectionWrapper('ZenWorkspacesStorage.removeWorkspace', async (db) => {
await db.execute(
`
DELETE FROM zen_workspaces WHERE uuid = :uuid
@@ -222,7 +226,7 @@ var ZenWorkspacesStorage = {
},
async wipeAllWorkspaces() {
await PlacesUtils.withConnectionWrapper('ZenWorkspacesStorage.wipeAllWorkspaces', async (db) => {
await this.lazy.PlacesUtils.withConnectionWrapper('ZenWorkspacesStorage.wipeAllWorkspaces', async (db) => {
await db.execute(`DELETE FROM zen_workspaces`);
await db.execute(`DELETE FROM zen_workspaces_changes`);
await this.updateLastChangeTimestamp(db);
@@ -232,7 +236,7 @@ var ZenWorkspacesStorage = {
async setDefaultWorkspace(uuid, notifyObservers = true) {
const changedUUIDs = [];
await PlacesUtils.withConnectionWrapper('ZenWorkspacesStorage.setDefaultWorkspace', async (db) => {
await this.lazy.PlacesUtils.withConnectionWrapper('ZenWorkspacesStorage.setDefaultWorkspace', async (db) => {
await db.executeTransaction(async () => {
const now = Date.now();
// Unset the default flag for all other workspaces
@@ -269,7 +273,7 @@ var ZenWorkspacesStorage = {
},
async markChanged(uuid) {
await PlacesUtils.withConnectionWrapper('ZenWorkspacesStorage.markChanged', async (db) => {
await this.lazy.PlacesUtils.withConnectionWrapper('ZenWorkspacesStorage.markChanged', async (db) => {
const now = Date.now();
await db.execute(`
INSERT OR REPLACE INTO zen_workspaces_changes (uuid, timestamp)
@@ -283,7 +287,7 @@ var ZenWorkspacesStorage = {
async saveWorkspaceTheme(uuid, theme, notifyObservers = true) {
const changedUUIDs = [uuid];
await PlacesUtils.withConnectionWrapper('saveWorkspaceTheme', async (db) => {
await this.lazy.PlacesUtils.withConnectionWrapper('saveWorkspaceTheme', async (db) => {
await db.execute(`
UPDATE zen_workspaces
SET
@@ -314,7 +318,7 @@ var ZenWorkspacesStorage = {
},
async getChangedIDs() {
const db = await PlacesUtils.promiseDBConnection();
const db = await this.lazy.PlacesUtils.promiseDBConnection();
const rows = await db.execute(`
SELECT uuid, timestamp FROM zen_workspaces_changes
`);
@@ -326,7 +330,7 @@ var ZenWorkspacesStorage = {
},
async clearChangedIDs() {
await PlacesUtils.withConnectionWrapper('ZenWorkspacesStorage.clearChangedIDs', async (db) => {
await this.lazy.PlacesUtils.withConnectionWrapper('ZenWorkspacesStorage.clearChangedIDs', async (db) => {
await db.execute(`DELETE FROM zen_workspaces_changes`);
});
},
@@ -363,7 +367,7 @@ var ZenWorkspacesStorage = {
},
async getLastChangeTimestamp() {
const db = await PlacesUtils.promiseDBConnection();
const db = await this.lazy.PlacesUtils.promiseDBConnection();
const result = await db.executeCached(`
SELECT value FROM moz_meta WHERE key = 'zen_workspaces_last_change'
`);
@@ -373,7 +377,7 @@ var ZenWorkspacesStorage = {
async updateWorkspacePositions(workspaces) {
const changedUUIDs = new Set();
await PlacesUtils.withConnectionWrapper('ZenWorkspacesStorage.updateWorkspacePositions', async (db) => {
await this.lazy.PlacesUtils.withConnectionWrapper('ZenWorkspacesStorage.updateWorkspacePositions', async (db) => {
await db.executeTransaction(async () => {
const now = Date.now();
@@ -414,7 +418,7 @@ var ZenWorkspaceBookmarksStorage = {
},
async _ensureTable() {
await PlacesUtils.withConnectionWrapper('ZenWorkspaceBookmarksStorage.init', async (db) => {
await ZenWorkspacesStorage.lazy.PlacesUtils.withConnectionWrapper('ZenWorkspaceBookmarksStorage.init', async (db) => {
// Create table using GUIDs instead of IDs
await db.execute(`
CREATE TABLE IF NOT EXISTS zen_bookmarks_workspaces (
@@ -475,7 +479,7 @@ var ZenWorkspaceBookmarksStorage = {
* @returns {Promise<number>} The timestamp of the last change.
*/
async getLastChangeTimestamp() {
const db = await PlacesUtils.promiseDBConnection();
const db = await ZenWorkspacesStorage.lazy.PlacesUtils.promiseDBConnection();
const result = await db.executeCached(`
SELECT value FROM moz_meta WHERE key = 'zen_bookmarks_workspaces_last_change'
`);
@@ -483,7 +487,7 @@ var ZenWorkspaceBookmarksStorage = {
},
async getBookmarkWorkspaces(bookmarkGuid) {
const db = await PlacesUtils.promiseDBConnection();
const db = await ZenWorkspacesStorage.lazy.PlacesUtils.promiseDBConnection();
const rows = await db.execute(`
SELECT workspace_uuid
@@ -505,7 +509,7 @@ var ZenWorkspaceBookmarksStorage = {
* }
*/
async getBookmarkGuidsByWorkspace() {
const db = await PlacesUtils.promiseDBConnection();
const db = await ZenWorkspacesStorage.lazy.PlacesUtils.promiseDBConnection();
const rows = await db.execute(`
SELECT workspace_uuid, GROUP_CONCAT(bookmark_guid) as bookmark_guids
@@ -528,9 +532,9 @@ var ZenWorkspaceBookmarksStorage = {
* @returns {Promise<Object>} An object mapping bookmark+workspace pairs to their change data.
*/
async getChangedIDs() {
const db = await PlacesUtils.promiseDBConnection();
const db = await ZenWorkspacesStorage.lazy.PlacesUtils.promiseDBConnection();
const rows = await db.execute(`
SELECT bookmark_guid, workspace_uuid, change_type, timestamp
SELECT bookmark_guid, workspace_uuid, change_type, timestamp
FROM zen_bookmarks_workspaces_changes
`);
@@ -549,9 +553,11 @@ var ZenWorkspaceBookmarksStorage = {
* Clear all recorded changes.
*/
async clearChangedIDs() {
await PlacesUtils.withConnectionWrapper('ZenWorkspaceBookmarksStorage.clearChangedIDs', async (db) => {
await ZenWorkspacesStorage.lazy.PlacesUtils.withConnectionWrapper('ZenWorkspaceBookmarksStorage.clearChangedIDs', async (db) => {
await db.execute(`DELETE FROM zen_bookmarks_workspaces_changes`);
});
},
};
};
ZenWorkspacesStorage.init();

View File

@@ -44,7 +44,7 @@ export class ZenGlanceChild extends JSWindowActorChild {
this.contentWindow.document.removeEventListener('click', this.clickListener);
} else if (activationMethod === 'ctrl' || activationMethod === 'alt' || activationMethod === 'shift') {
this.contentWindow.document.addEventListener('click', this.clickListener);
this.contentWindow.document.addEventListener('click', this.clickListener, { capture: true });
this.contentWindow.removeEventListener('mousedown', this.mouseDownListener);
this.contentWindow.removeEventListener('mouseup', this.mouseUpListener);
@@ -82,7 +82,6 @@ export class ZenGlanceChild extends JSWindowActorChild {
async handleMouseDown(event) {
const target = event.target.closest('A');
console.log('target', target);
if (!target) {
return;
}

View File

@@ -1,5 +1,5 @@
diff --git a/browser/components/customizableui/CustomizableUI.sys.mjs b/browser/components/customizableui/CustomizableUI.sys.mjs
index 45d0e0e4872eeabf87862dbadfee1dc211ed7bed..5a0825ff92c115bf30046a01cff17f189005d5ef 100644
index 45d0e0e4872eeabf87862dbadfee1dc211ed7bed..04a65485a3493fd42b2a58523123f1392ed9c3b2 100644
--- a/browser/components/customizableui/CustomizableUI.sys.mjs
+++ b/browser/components/customizableui/CustomizableUI.sys.mjs
@@ -13,6 +13,7 @@ ChromeUtils.defineESModuleGetters(lazy, {
@@ -78,6 +78,24 @@ index 45d0e0e4872eeabf87862dbadfee1dc211ed7bed..5a0825ff92c115bf30046a01cff17f18
// For toolbars that need it, mark as dirty.
let defaultPlacements = areaProperties.get("defaultPlacements");
if (
@@ -3603,7 +3609,7 @@ var CustomizableUIInternal = {
}
},
- _rebuildRegisteredAreas() {
+ _rebuildRegisteredAreas(zenDontRebuildCollapsed = false) {
for (let [areaId, areaNodes] of gBuildAreas) {
let placements = gPlacements.get(areaId);
let isFirstChangedToolbar = true;
@@ -3614,7 +3620,7 @@ var CustomizableUIInternal = {
if (area.get("type") == CustomizableUI.TYPE_TOOLBAR) {
let defaultCollapsed = area.get("defaultCollapsed");
let win = areaNode.ownerGlobal;
- if (defaultCollapsed !== null) {
+ if (defaultCollapsed !== null && !zenDontRebuildCollapsed) {
win.setToolbarVisibility(
areaNode,
typeof defaultCollapsed == "string"
@@ -4572,6 +4578,7 @@ export var CustomizableUI = {
unregisterArea(aName, aDestroyPlacements) {
CustomizableUIInternal.unregisterArea(aName, aDestroyPlacements);

View File

@@ -0,0 +1,13 @@
diff --git a/browser/components/customizableui/content/panelUI.js b/browser/components/customizableui/content/panelUI.js
index 1805bad6c58e060533f634ed9e511c05cad3ded1..4eb04f3eb1b9dd1c5d663cca0a7ad903b38c4efd 100644
--- a/browser/components/customizableui/content/panelUI.js
+++ b/browser/components/customizableui/content/panelUI.js
@@ -545,7 +545,7 @@ const PanelUI = {
if (viewShown) {
CustomizableUI.addPanelCloseListeners(tempPanel);
- tempPanel.addEventListener("popuphidden", panelRemover);
+ tempPanel.addEventListener("popuphidden", panelRemover, { capture: true });
} else {
panelRemover();
}

View File

@@ -439,7 +439,7 @@ var gZenMarketplaceManager = {
}
input.addEventListener(
'input',
'change',
ZenThemesCommon.throttle((event) => {
const value = event.target.value;

View File

@@ -1,5 +1,5 @@
diff --git a/browser/components/urlbar/UrlbarInput.sys.mjs b/browser/components/urlbar/UrlbarInput.sys.mjs
index c504c9afc43785b5f003bb1f9f1dfbddef38d78b..f4167cf9f3dcbbb8666118436e9f79137caf565a 100644
index c504c9afc43785b5f003bb1f9f1dfbddef38d78b..b08cb1d9fee5f76070c70ea928209b15b6146cb3 100644
--- a/browser/components/urlbar/UrlbarInput.sys.mjs
+++ b/browser/components/urlbar/UrlbarInput.sys.mjs
@@ -65,6 +65,13 @@ XPCOMUtils.defineLazyPreferenceGetter(
@@ -16,18 +16,17 @@ index c504c9afc43785b5f003bb1f9f1dfbddef38d78b..f4167cf9f3dcbbb8666118436e9f7913
const DEFAULT_FORM_HISTORY_NAME = "searchbar-history";
const SEARCH_BUTTON_CLASS = "urlbar-search-button";
@@ -2154,6 +2161,10 @@ export class UrlbarInput {
@@ -2154,6 +2161,9 @@ export class UrlbarInput {
this.setAttribute("breakout-extend", "true");
+ if (lazy.ZEN_URLBAR_BEHAVIOR == 'float' || (lazy.ZEN_URLBAR_BEHAVIOR == 'floating-on-type' && !this.focusedViaMousedown)) {
+ this.setAttribute("zen-floating-urlbar", "true");
+ } else this.removeAttribute("zen-floating-urlbar");
+
// Enable the animation only after the first extend call to ensure it
// doesn't run when opening a new window.
if (!this.hasAttribute("breakout-extend-animate")) {
@@ -3901,6 +3912,11 @@ export class UrlbarInput {
@@ -3901,6 +3911,11 @@ export class UrlbarInput {
}
_on_click(event) {
@@ -39,20 +38,21 @@ index c504c9afc43785b5f003bb1f9f1dfbddef38d78b..f4167cf9f3dcbbb8666118436e9f7913
if (
event.target == this.inputField ||
event.target == this._inputContainer ||
@@ -4012,8 +4028,11 @@ export class UrlbarInput {
@@ -4012,9 +4027,12 @@ export class UrlbarInput {
}
_on_mousedown(event) {
- switch (event.currentTarget) {
+ switch (event.zenOriginalTarget || event.currentTarget) {
case this.textbox: {
this._mousedownOnUrlbarDescendant = true;
+ if (event.type != "click" && lazy.ZEN_URLBAR_BEHAVIOR === 'float') {
+ return true;
+ }
this._mousedownOnUrlbarDescendant = true;
if (
@@ -4024,8 +4043,8 @@ export class UrlbarInput {
event.target != this.inputField &&
@@ -4024,8 +4042,8 @@ export class UrlbarInput {
break;
}

View File

@@ -39,7 +39,7 @@ body {
#welcome .zen-branding-title,
#thanks .zen-branding-title {
text-align: center;
font-size: 11rem;
font-size: 9rem;
}
#buttons-footer {

View File

@@ -266,7 +266,7 @@ groupbox h2 {
padding: 7px;
&[left] div {
&[top] div {
width: 100%;
background: var(--zen-primary-color);
border-radius: 5px;
@@ -274,7 +274,7 @@ groupbox h2 {
box-shadow: var(--zen-compact-mode-styles-shadow);
}
&[top] div {
&[left] div {
width: 18px;
background: var(--zen-primary-color);
border-radius: 5px;

View File

@@ -26,19 +26,11 @@
#forward-button,
#zen-sidebar-web-panel-forward {
list-style-image: url('forward.svg') !important;
@media (max-width: 650px) {
display: none;
}
}
#reload-button,
#zen-sidebar-web-panel-reload {
list-style-image: url('reload.svg') !important;
@media (max-width: 650px) {
display: none;
}
}
#stop-button,
@@ -82,10 +74,6 @@
#appMenu-downloads-button,
#appMenu-library-downloads-button {
list-style-image: url('downloads.svg') !important;
@media (max-width: 650px) {
display: none;
}
}
#appMenu-translate-button {

View File

@@ -0,0 +1,13 @@
diff --git a/devtools/startup/locales/en-US/key-shortcuts.ftl b/devtools/startup/locales/en-US/key-shortcuts.ftl
index bbc2c7ca1e8c3544289407371457790cf8b0fa65..f307e5cb75df9175106184f97b2f500c1adf9fca 100644
--- a/devtools/startup/locales/en-US/key-shortcuts.ftl
+++ b/devtools/startup/locales/en-US/key-shortcuts.ftl
@@ -13,7 +13,7 @@ devtools-commandkey-browser-console = J
# Key pressed to toggle on the Responsive Design Mode
devtools-commandkey-responsive-design-mode = M
# Key pressed to open a toolbox with the inspector panel selected
-devtools-commandkey-inspector = C
+devtools-commandkey-inspector = L
# Key pressed to open a toolbox with the web console panel selected
devtools-commandkey-webconsole = K
# Key pressed to open a toolbox with the debugger panel selected

View File

@@ -1,13 +1,16 @@
diff --git a/testing/profiles/profileserver/user.js b/testing/profiles/profileserver/user.js
index 19ff7d474f6d22d2d386764e2e6942ce6a324470..3cec3a25acc6f8780d56d273995974a905b6c031 100644
index 19ff7d474f6d22d2d386764e2e6942ce6a324470..40d1906bdebd08510014fd6124be17052248e748 100644
--- a/testing/profiles/profileserver/user.js
+++ b/testing/profiles/profileserver/user.js
@@ -8,3 +8,7 @@
@@ -8,3 +8,11 @@
user_pref("dom.timeout.enable_budget_timer_throttling", false);
// Turn off update
user_pref("app.update.disabledForTesting", true);
+
+// zen:
+// Disable workspaces in order to prevent SQL calls
+// Disable some of zen's features to better match the default Firefox experience
+user_pref("zen.workspaces.enabled", false);
\ No newline at end of file
+user_pref("zen.welcome-screen.enabled", false);
+user_pref("zen.tab-unloader.enabled", false);
+user_pref("zen.watermark.enabled", false);
+user_pref("zen.glance.enabled", false);

View File

@@ -0,0 +1,13 @@
diff --git a/toolkit/components/extensions/parent/ext-runtime.js b/toolkit/components/extensions/parent/ext-runtime.js
index ff7aae6e5f1919d8d4ff1c7e85b6150332adc20f..5d935e3d0dfb91cd01268d4e2c4dee4696c33efe 100644
--- a/toolkit/components/extensions/parent/ext-runtime.js
+++ b/toolkit/components/extensions/parent/ext-runtime.js
@@ -331,7 +331,7 @@ this.runtime = class extends ExtensionAPIPersistent {
getBrowserInfo: function () {
const { name, vendor, version, appBuildID } = Services.appinfo;
- const info = { name, vendor, version, buildID: appBuildID };
+ const info = { name, vendor, version: AppConstants.ZEN_FIREFOX_VERSION, buildID: appBuildID };
return Promise.resolve(info);
},

View File

@@ -0,0 +1,12 @@
diff --git a/widget/windows/nsLookAndFeel.cpp b/widget/windows/nsLookAndFeel.cpp
index 58c5fc3b55da47109e16cc3d6f44b0950b2965e7..ae1713898d0b8298480bdaf8a9ef7629423c3dee 100644
--- a/widget/windows/nsLookAndFeel.cpp
+++ b/widget/windows/nsLookAndFeel.cpp
@@ -849,6 +849,7 @@ auto nsLookAndFeel::ComputeTitlebarColors() -> TitlebarColors {
// turned on.
result.mUseAccent =
dwmKey.GetValueAsDword(u"ColorPrevalence"_ns).valueOr(0) == 1;
+ result.mUseAccent = false; // Zen: Disable accent color in titlebar because it's ugly
if (!result.mUseAccent) {
return result;
}