Compare commits
82 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a17a1da3b8 | ||
|
|
ecbce38f52 | ||
|
|
0693bb7a61 | ||
|
|
7f28047f82 | ||
|
|
d1fffc59cf | ||
|
|
8e799a678f | ||
|
|
a3f1733fd4 | ||
|
|
ea23c3f63d | ||
|
|
7d51ae1f07 | ||
|
|
469604dd28 | ||
|
|
3f77bc972b | ||
|
|
59263eae9e | ||
|
|
251967435d | ||
|
|
a93e50cc54 | ||
|
|
54bdabbf25 | ||
|
|
5b7445fe31 | ||
|
|
09ee6f2097 | ||
|
|
f240fabe77 | ||
|
|
bf6e493f89 | ||
|
|
75a3b82d2c | ||
|
|
9c8b442a46 | ||
|
|
1f3d8b492b | ||
|
|
5013533ad8 | ||
|
|
adc4b956dd | ||
|
|
219d1989d9 | ||
|
|
fa7f986319 | ||
|
|
ce75bc152a | ||
|
|
289e84b75d | ||
|
|
4da5a40419 | ||
|
|
7bf0b42afd | ||
|
|
5488b1d62e | ||
|
|
ef22f08115 | ||
|
|
e8c43f5979 | ||
|
|
e9bbbaf446 | ||
|
|
b932558ad6 | ||
|
|
376c64c892 | ||
|
|
548ed6e0f5 | ||
|
|
df916f1e4a | ||
|
|
847aef5b02 | ||
|
|
17654139ba | ||
|
|
e1974d9f81 | ||
|
|
fcff502d1a | ||
|
|
0e030dcb08 | ||
|
|
aa4e385b6b | ||
|
|
c9488c0384 | ||
|
|
bcf879b801 | ||
|
|
84072192b9 | ||
|
|
d786c6927f | ||
|
|
2a0113408c | ||
|
|
967d0dd730 | ||
|
|
af36549c7e | ||
|
|
6e2ce89d21 | ||
|
|
2d5fed3cd9 | ||
|
|
ba4eef0db9 | ||
|
|
872f7bdcbe | ||
|
|
8f6ca03240 | ||
|
|
35245078c9 | ||
|
|
fd8a55c57c | ||
|
|
8fce658dc1 | ||
|
|
df963fc035 | ||
|
|
ffab4a8c02 | ||
|
|
ebd1910bb8 | ||
|
|
10592ed243 | ||
|
|
3da1da968e | ||
|
|
bb2196900b | ||
|
|
8ef4460f00 | ||
|
|
a1bd202b51 | ||
|
|
3faf5cd404 | ||
|
|
d35abc991e | ||
|
|
7a29340efc | ||
|
|
cf6a346749 | ||
|
|
9f047b7dcf | ||
|
|
7a50336908 | ||
|
|
89efc6cb0a | ||
|
|
5b3b72b9aa | ||
|
|
a6d749a9c8 | ||
|
|
a570a266e5 | ||
|
|
0f5f14defe | ||
|
|
ab9a752286 | ||
|
|
8f06bf21b0 | ||
|
|
eaa099f9cc | ||
|
|
0642ceba40 |
@@ -1 +1 @@
|
||||
{bugId} - {message}, c={components}, t={type}
|
||||
{type}: {message}, b={bugId}, c={components}
|
||||
4
.github/workflows/build.yml
vendored
4
.github/workflows/build.yml
vendored
@@ -548,7 +548,7 @@ jobs:
|
||||
# If we are on Twilight, we want to just update the Twilight tag's release
|
||||
- name: Update Twilight tag
|
||||
if: ${{ inputs.update_branch == 'twilight' }}
|
||||
uses: softprops/action-gh-release@v2
|
||||
uses: softprops/action-gh-release@v2.2.2
|
||||
with:
|
||||
body_path: release_notes.md
|
||||
files: |
|
||||
@@ -580,7 +580,7 @@ jobs:
|
||||
GITHUB_REPOSITORY: ${{ github.repository }}
|
||||
|
||||
- name: Release
|
||||
uses: softprops/action-gh-release@v2
|
||||
uses: softprops/action-gh-release@v2.2.2
|
||||
if: ${{ inputs.update_branch == 'release' }}
|
||||
with:
|
||||
token: ${{ secrets.DEPLOY_KEY }}
|
||||
|
||||
9
.github/workflows/linux-release-build.yml
vendored
9
.github/workflows/linux-release-build.yml
vendored
@@ -121,6 +121,11 @@ jobs:
|
||||
./mach --no-interactive bootstrap --application-choice browser
|
||||
cd ..
|
||||
|
||||
- name: Insert API Keys
|
||||
run: |
|
||||
mkdir -p ~/.zen-keys
|
||||
echo "${{ secrets.ZEN_SAFEBROWSING_API_KEY }}" > ~/.zen-keys/safebrowsing.dat
|
||||
|
||||
- name: Build
|
||||
env:
|
||||
SURFER_COMPAT: ${{ matrix.arch }}
|
||||
@@ -142,6 +147,10 @@ jobs:
|
||||
export ZEN_RELEASE=1
|
||||
npm run package
|
||||
|
||||
- name: Remove API Keys
|
||||
run: |
|
||||
rm -rf ~/.zen-keys
|
||||
|
||||
- name: Rename artifacts
|
||||
run: |
|
||||
mv dist/zen-*.tar.xz "zen.linux-${{ matrix.arch }}.tar.xz"
|
||||
|
||||
9
.github/workflows/macos-release-build.yml
vendored
9
.github/workflows/macos-release-build.yml
vendored
@@ -132,6 +132,11 @@ jobs:
|
||||
- name: Build language packs
|
||||
run: sh scripts/download-language-packs.sh
|
||||
|
||||
- name: Insert API Keys
|
||||
run: |
|
||||
mkdir -p ~/.zen-keys
|
||||
echo "${{ secrets.ZEN_SAFEBROWSING_API_KEY }}" > ~/.zen-keys/safebrowsing.dat
|
||||
|
||||
- name: Build Zen
|
||||
env:
|
||||
SURFER_COMPAT: ${{ matrix.arch }}
|
||||
@@ -152,6 +157,10 @@ jobs:
|
||||
export ZEN_RELEASE=1
|
||||
npm run package
|
||||
|
||||
- name: Remove API Keys
|
||||
run: |
|
||||
rm -rf ~/.zen-keys
|
||||
|
||||
- name: Rename artifacts
|
||||
run: |
|
||||
echo "Tarballing DMG"
|
||||
|
||||
9
.github/workflows/windows-release-build.yml
vendored
9
.github/workflows/windows-release-build.yml
vendored
@@ -226,6 +226,11 @@ jobs:
|
||||
chmod +x ~/artifact/en-US.log
|
||||
chmod +x ~/artifact/merged.profdata
|
||||
|
||||
- name: Insert API Keys
|
||||
run: |
|
||||
mkdir -p ~/.zen-keys
|
||||
echo "${{ secrets.ZEN_SAFEBROWSING_API_KEY }}" > ~/.zen-keys/safebrowsing.dat
|
||||
|
||||
- name: Build
|
||||
if: ${{ !(inputs.generate-gpo && matrix.arch == 'aarch64') }}
|
||||
env:
|
||||
@@ -259,6 +264,10 @@ jobs:
|
||||
ls ./dist
|
||||
ls .
|
||||
|
||||
- name: Remove API Keys
|
||||
run: |
|
||||
rm -rf ~/.zen-keys
|
||||
|
||||
- name: Move package for PGO upload
|
||||
if: ${{ inputs.generate-gpo && matrix.arch == 'x86_64' }}
|
||||
run: |
|
||||
|
||||
@@ -26,7 +26,7 @@ docs/issue-metrics/*.md
|
||||
# We also dont want to format the CSS files that are generated by the build
|
||||
src/zen/tabs/zen-tabs.css
|
||||
src/zen/compact-mode/zen-compact-mode.css
|
||||
src/zen/common/ZenEmojies.mjs
|
||||
src/zen/common/ZenEmojis.mjs
|
||||
|
||||
src/zen/workspaces/zen-workspaces.css
|
||||
|
||||
|
||||
@@ -29,8 +29,8 @@ Zen is a firefox-based browser with the aim of pushing your productivity to a ne
|
||||
|
||||
### Firefox Versions
|
||||
|
||||
- [`Release`](https://zen-browser.app/download) - Is currently built using Firefox version `139.0.1`! 🚀
|
||||
- [`Twilight`](https://zen-browser.app/download?twilight) - Is currently built using Firefox version `RC 139.0.1`!
|
||||
- [`Release`](https://zen-browser.app/download) - Is currently built using Firefox version `139.0.4`! 🚀
|
||||
- [`Twilight`](https://zen-browser.app/download?twilight) - Is currently built using Firefox version `RC 139.0.4`!
|
||||
|
||||
### Contributing
|
||||
|
||||
|
||||
@@ -1 +1 @@
|
||||
6548d6b52a8969b347101142ed630393332ab274
|
||||
29fd9c19879c6f9bfcf414f47426d8dc00dee1a5
|
||||
@@ -32,6 +32,11 @@ if ! test "$SCCACHE_GHA_ENABLED" = "false"; then
|
||||
fi
|
||||
fi
|
||||
|
||||
# add safe browsing key if it exists on a file
|
||||
if test -f "$HOME/.zen-keys/safebrowsing.dat"; then
|
||||
ac_add_options --with-google-safebrowsing-api-keyfile="$HOME/.zen-keys/safebrowsing.dat"
|
||||
fi
|
||||
|
||||
if test "$ZEN_RELEASE"; then
|
||||
|
||||
# TODO: Make this successful in builds
|
||||
@@ -96,10 +101,7 @@ fi
|
||||
|
||||
ac_add_options --enable-unverified-updates
|
||||
|
||||
ac_add_options --enable-raw
|
||||
ac_add_options --enable-webrtc
|
||||
ac_add_options --enable-jxl
|
||||
ac_add_options --enable-av1
|
||||
|
||||
ac_add_options --with-unsigned-addon-scopes=app,system
|
||||
|
||||
|
||||
2
l10n
2
l10n
Submodule l10n updated: d0ffb8e391...0268dc81cf
12
package-lock.json
generated
12
package-lock.json
generated
@@ -3019,9 +3019,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/prebuild-install/node_modules/tar-fs": {
|
||||
"version": "2.1.2",
|
||||
"resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-2.1.2.tgz",
|
||||
"integrity": "sha512-EsaAXwxmx8UB7FRKqeozqEPop69DXcmYwTQwXvyAPF352HJsPdkVhvTaDPYqfNgruveJIJy3TA2l+2zj8LJIJA==",
|
||||
"version": "2.1.3",
|
||||
"resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-2.1.3.tgz",
|
||||
"integrity": "sha512-090nwYJDmlhwFwEW3QQl+vaNnxsO2yVsd45eTKRBzSzu+hlb1w2K9inVq5b0ngXuLVqQ4ApvsUHHnu/zQNkWAg==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"chownr": "^1.1.1",
|
||||
@@ -3667,9 +3667,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/tar-fs": {
|
||||
"version": "3.0.8",
|
||||
"resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-3.0.8.tgz",
|
||||
"integrity": "sha512-ZoROL70jptorGAlgAYiLoBLItEKw/fUxg9BSYK/dF/GAGYFJOJJJMvjPAKDJraCXFwadD456FCuvLWgfhMsPwg==",
|
||||
"version": "3.0.9",
|
||||
"resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-3.0.9.tgz",
|
||||
"integrity": "sha512-XF4w9Xp+ZQgifKakjZYmFdkLoSWd34VGKcsTCwlNWM7QG3ZbaxnTsaBwnjFZqHRf/rROxaR8rXnbtwdvaDI+lA==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"pump": "^3.0.0",
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
// 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/.
|
||||
|
||||
pref("browser.ml.chat.enabled", false);
|
||||
pref("browser.ml.chat.shortcuts", false);
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
|
||||
// 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/.
|
||||
|
||||
// Restore session on startup
|
||||
pref("browser.startup.page", 3);
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
// 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/.
|
||||
|
||||
// Common UI changes
|
||||
pref("browser.privatebrowsing.vpnpromourl", "", locked);
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
// 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/.
|
||||
|
||||
// security: They must enable this themselves, to avoid people downloading malware
|
||||
pref('xpinstall.signatures.required', true);
|
||||
|
||||
@@ -1,5 +1,12 @@
|
||||
// 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/.
|
||||
|
||||
pref('zen.welcome-screen.seen', false, sticky);
|
||||
#ifdef MOZILLA_OFFICIAL
|
||||
pref('zen.welcome-screen.seen', false, sticky);
|
||||
#else
|
||||
pref('zen.welcome-screen.seen', true, sticky);
|
||||
#endif
|
||||
|
||||
pref('zen.tabs.vertical', true);
|
||||
pref('zen.tabs.vertical.right-side', false);
|
||||
@@ -8,135 +15,27 @@ pref('zen.tabs.show-newtab-vertical', true);
|
||||
|
||||
pref('zen.ctrlTab.show-pending-tabs', false);
|
||||
|
||||
pref('zen.theme.accent-color', "#ffb787");
|
||||
pref('zen.theme.content-element-separation', 8); // In pixels
|
||||
pref('zen.theme.gradient', true);
|
||||
pref('zen.theme.gradient.show-custom-colors', false);
|
||||
pref('zen.theme.essentials-favicon-bg', true);
|
||||
|
||||
pref('zen.view.show-newtab-button-border-top', false);
|
||||
pref('zen.view.show-newtab-button-top', true);
|
||||
|
||||
pref('zen.mediacontrols.enabled', true);
|
||||
|
||||
// Exposure:
|
||||
pref('zen.haptic-feedback.enabled', true);
|
||||
|
||||
pref('zen.mods.auto-update-days', 20); // In days
|
||||
#include features/mods.inc
|
||||
#include features/theme.inc
|
||||
#include features/compact-mode.inc
|
||||
#include features/urlbar.inc
|
||||
#include features/glance.inc
|
||||
#include features/view.inc
|
||||
#include features/downloads.inc
|
||||
#include features/workspaces.inc
|
||||
#include features/split-view.inc
|
||||
#include features/kbs.inc
|
||||
|
||||
// Section: Watermark
|
||||
#ifdef MOZILLA_OFFICIAL
|
||||
pref('zen.mods.auto-update', true);
|
||||
pref('zen.rice.api.url', 'https://share.zen-browser.app', locked);
|
||||
pref('zen.injections.match-urls', 'https://zen-browser.app/*,https://share.zen-browser.app/*', locked);
|
||||
pref('zen.watermark.enabled', true, sticky);
|
||||
#else
|
||||
pref('zen.mods.auto-update', false);
|
||||
pref('zen.rice.api.url', "http://localhost", locked);
|
||||
pref('zen.injections.match-urls', 'http://localhost/*', locked);
|
||||
#endif
|
||||
|
||||
pref('zen.rice.share.notice.accepted', false);
|
||||
|
||||
#ifdef XP_MACOSX
|
||||
pref('zen.theme.border-radius', 10); // In pixels
|
||||
#else
|
||||
pref('zen.theme.border-radius', 8); // In pixels
|
||||
#endif
|
||||
|
||||
#ifdef XP_MACOSX
|
||||
pref('zen.theme.acrylic-elements', false);
|
||||
#else
|
||||
pref('zen.theme.acrylic-elements', false);
|
||||
#endif
|
||||
|
||||
pref('zen.theme.color-prefs.use-workspace-colors', true);
|
||||
|
||||
pref('zen.view.compact.hide-tabbar', true);
|
||||
pref('zen.view.compact.hide-toolbar', false);
|
||||
pref('zen.view.compact.toolbar-flash-popup', false);
|
||||
pref('zen.view.compact.toolbar-flash-popup.duration', 800);
|
||||
pref('zen.view.compact.toolbar-hide-after-hover.duration', 1000);
|
||||
pref('zen.view.compact.color-toolbar', true);
|
||||
pref('zen.view.compact.color-sidebar', true);
|
||||
pref('zen.view.compact.animate-sidebar', true);
|
||||
pref('zen.view.compact.show-sidebar-and-toolbar-on-hover', true);
|
||||
pref('zen.view.compact.show-background-tab-toast', true);
|
||||
|
||||
pref('zen.urlbar.replace-newtab', true);
|
||||
pref('zen.urlbar.show-protections-icon', false);
|
||||
pref('zen.urlbar.behavior', 'floating-on-type'); // default, floating-on-type, float
|
||||
pref('zen.urlbar.wait-to-clear', 45000); // in ms (default 45s)
|
||||
pref('zen.urlbar.show-domain-only-in-sidebar', true);
|
||||
pref('zen.urlbar.hide-one-offs', true);
|
||||
pref('zen.urlbar.enable-overrides', false);
|
||||
|
||||
// Glance
|
||||
pref('zen.glance.enabled', true);
|
||||
pref('zen.glance.hold-duration', 300); // in ms
|
||||
pref('zen.glance.open-essential-external-links', true);
|
||||
pref('zen.glance.activation-method', 'alt'); // ctrl, alt, shift, none, hold
|
||||
|
||||
pref('zen.view.sidebar-height-throttle', 200); // in ms
|
||||
pref('zen.view.sidebar-expanded.max-width', 500);
|
||||
|
||||
#ifdef XP_MACOSX
|
||||
pref('zen.view.mac.show-three-dot-menu', false);
|
||||
pref('zen.widget.mac.mono-window-controls', true);
|
||||
#endif
|
||||
pref('zen.view.use-single-toolbar', true);
|
||||
pref('zen.view.sidebar-expanded', true);
|
||||
pref('zen.view.sidebar-collapsed.hide-mute-button', true);
|
||||
pref('zen.view.experimental-force-window-controls-left', false);
|
||||
|
||||
#ifdef XP_MACOSX
|
||||
pref('zen.view.grey-out-inactive-windows', false);
|
||||
#else
|
||||
pref('zen.view.grey-out-inactive-windows', true);
|
||||
#endif
|
||||
|
||||
pref('zen.view.hide-window-controls', true);
|
||||
pref('zen.view.experimental-no-window-controls', false);
|
||||
|
||||
pref('zen.keyboard.shortcuts.enabled', true);
|
||||
pref('zen.keyboard.shortcuts.version', 0); // Empty string means default shortcuts
|
||||
pref('zen.keyboard.shortcuts.disable-mainkeyset-clear', false); // for debugging
|
||||
|
||||
pref('zen.themes.updated-value-observer', false);
|
||||
|
||||
pref('zen.pinned-tab-manager.debug', false);
|
||||
pref('zen.pinned-tab-manager.restore-pinned-tabs-to-pinned-url', false);
|
||||
pref('zen.pinned-tab-manager.close-shortcut-behavior', 'reset-unload-switch');
|
||||
|
||||
#ifdef MOZILLA_OFFICIAL
|
||||
pref('zen.watermark.enabled', true, sticky);
|
||||
#else
|
||||
pref('zen.watermark.enabled', false, sticky);
|
||||
pref('zen.watermark.enabled', false, sticky);
|
||||
#endif
|
||||
|
||||
// Startup flags
|
||||
pref('zen.startup.smooth-scroll-in-tabs', true);
|
||||
|
||||
// Zen Workspaces
|
||||
pref('zen.workspaces.continue-where-left-off', false);
|
||||
pref('zen.workspaces.hide-default-container-indicator', true);
|
||||
pref('zen.workspaces.force-container-workspace', false);
|
||||
pref('zen.workspaces.open-new-tab-if-last-unpinned-tab-is-closed', false);
|
||||
pref('zen.workspaces.swipe-actions', true);
|
||||
pref('zen.workspaces.wrap-around-navigation', true);
|
||||
pref('zen.workspaces.natural-scroll', false);
|
||||
pref('zen.workspaces.scroll-modifier-key','ctrl'); // can be ctrl, alt, shift, or a meta key
|
||||
pref('services.sync.engine.workspaces', false);
|
||||
pref('zen.workspaces.container-specific-essentials-enabled', false);
|
||||
|
||||
#ifdef MOZILLA_OFFICIAL
|
||||
pref('zen.workspaces.debug', false);
|
||||
#else
|
||||
pref('zen.workspaces.debug', true);
|
||||
#endif
|
||||
|
||||
// Zen Split View
|
||||
pref('zen.splitView.enable-tab-drop', true);
|
||||
pref('zen.splitView.min-resize-width', 7);
|
||||
pref('zen.splitView.rearrange-hover-size', 24);
|
||||
|
||||
// Zen Download Animations
|
||||
pref('zen.downloads.download-animation', true);
|
||||
pref('zen.downloads.download-animation-duration', 1000); // ms
|
||||
|
||||
14
src/browser/app/profile/features/compact-mode.inc
Normal file
14
src/browser/app/profile/features/compact-mode.inc
Normal file
@@ -0,0 +1,14 @@
|
||||
// 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/.
|
||||
|
||||
pref('zen.view.compact.hide-tabbar', true);
|
||||
pref('zen.view.compact.hide-toolbar', false);
|
||||
pref('zen.view.compact.toolbar-flash-popup', false);
|
||||
pref('zen.view.compact.toolbar-flash-popup.duration', 800);
|
||||
pref('zen.view.compact.toolbar-hide-after-hover.duration', 1000);
|
||||
pref('zen.view.compact.color-toolbar', true);
|
||||
pref('zen.view.compact.color-sidebar', true);
|
||||
pref('zen.view.compact.animate-sidebar', true);
|
||||
pref('zen.view.compact.show-sidebar-and-toolbar-on-hover', true);
|
||||
pref('zen.view.compact.show-background-tab-toast', true);
|
||||
6
src/browser/app/profile/features/downloads.inc
Normal file
6
src/browser/app/profile/features/downloads.inc
Normal file
@@ -0,0 +1,6 @@
|
||||
// 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/.
|
||||
|
||||
pref('zen.downloads.download-animation', true);
|
||||
pref('zen.downloads.download-animation-duration', 1000); // ms
|
||||
9
src/browser/app/profile/features/glance.inc
Normal file
9
src/browser/app/profile/features/glance.inc
Normal file
@@ -0,0 +1,9 @@
|
||||
// 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/.
|
||||
|
||||
pref('zen.glance.enabled', true);
|
||||
pref('zen.glance.enable-contextmenu-search', true);
|
||||
pref('zen.glance.hold-duration', 300); // in ms
|
||||
pref('zen.glance.open-essential-external-links', true);
|
||||
pref('zen.glance.activation-method', 'alt'); // ctrl, alt, shift, none, hold
|
||||
7
src/browser/app/profile/features/kbs.inc
Normal file
7
src/browser/app/profile/features/kbs.inc
Normal file
@@ -0,0 +1,7 @@
|
||||
// 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/.
|
||||
|
||||
pref('zen.keyboard.shortcuts.enabled', true);
|
||||
pref('zen.keyboard.shortcuts.version', 0); // Empty string means default shortcuts
|
||||
pref('zen.keyboard.shortcuts.disable-mainkeyset-clear', false); // for debugging
|
||||
19
src/browser/app/profile/features/mods.inc
Normal file
19
src/browser/app/profile/features/mods.inc
Normal file
@@ -0,0 +1,19 @@
|
||||
// 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/.
|
||||
|
||||
pref('zen.mods.updated-value-observer', false);
|
||||
|
||||
pref('zen.mods.auto-update-days', 20); // In days
|
||||
|
||||
#ifdef MOZILLA_OFFICIAL
|
||||
pref('zen.mods.auto-update', true);
|
||||
pref('zen.rice.api.url', 'https://share.zen-browser.app', locked);
|
||||
pref('zen.injections.match-urls', 'https://zen-browser.app/*,https://share.zen-browser.app/*', locked);
|
||||
#else
|
||||
pref('zen.mods.auto-update', false);
|
||||
pref('zen.rice.api.url', "http://localhost", locked);
|
||||
pref('zen.injections.match-urls', 'http://localhost/*', locked);
|
||||
#endif
|
||||
|
||||
pref('zen.rice.share.notice.accepted', false);
|
||||
7
src/browser/app/profile/features/split-view.inc
Normal file
7
src/browser/app/profile/features/split-view.inc
Normal file
@@ -0,0 +1,7 @@
|
||||
// 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/.
|
||||
|
||||
pref('zen.splitView.enable-tab-drop', true);
|
||||
pref('zen.splitView.min-resize-width', 7);
|
||||
pref('zen.splitView.rearrange-hover-size', 24);
|
||||
22
src/browser/app/profile/features/theme.inc
Normal file
22
src/browser/app/profile/features/theme.inc
Normal file
@@ -0,0 +1,22 @@
|
||||
// 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/.
|
||||
|
||||
pref('zen.theme.accent-color', "#ffb787");
|
||||
pref('zen.theme.content-element-separation', 8); // In pixels
|
||||
pref('zen.theme.gradient', true);
|
||||
pref('zen.theme.gradient.show-custom-colors', false);
|
||||
pref('zen.theme.essentials-favicon-bg', true);
|
||||
|
||||
#ifdef XP_MACOSX
|
||||
pref('zen.theme.border-radius', 10); // In pixels
|
||||
#else
|
||||
pref('zen.theme.border-radius', 8); // In pixels
|
||||
#endif
|
||||
|
||||
#ifdef XP_MACOSX
|
||||
pref('zen.theme.acrylic-elements', false);
|
||||
#else
|
||||
pref('zen.theme.acrylic-elements', false);
|
||||
#endif
|
||||
|
||||
11
src/browser/app/profile/features/urlbar.inc
Normal file
11
src/browser/app/profile/features/urlbar.inc
Normal file
@@ -0,0 +1,11 @@
|
||||
// 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/.
|
||||
|
||||
pref('zen.urlbar.replace-newtab', true);
|
||||
pref('zen.urlbar.show-protections-icon', false);
|
||||
pref('zen.urlbar.behavior', 'floating-on-type'); // default, floating-on-type, float
|
||||
pref('zen.urlbar.wait-to-clear', 45000); // in ms (default 45s)
|
||||
pref('zen.urlbar.show-domain-only-in-sidebar', true);
|
||||
pref('zen.urlbar.hide-one-offs', true);
|
||||
pref('zen.urlbar.enable-overrides', false);
|
||||
28
src/browser/app/profile/features/view.inc
Normal file
28
src/browser/app/profile/features/view.inc
Normal file
@@ -0,0 +1,28 @@
|
||||
// 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/.
|
||||
|
||||
pref('zen.view.sidebar-height-throttle', 0); // in ms
|
||||
pref('zen.view.sidebar-expanded.max-width', 500);
|
||||
|
||||
#ifdef XP_MACOSX
|
||||
pref('zen.view.mac.show-three-dot-menu', false);
|
||||
pref('zen.widget.mac.mono-window-controls', true);
|
||||
#endif
|
||||
|
||||
pref('zen.view.use-single-toolbar', true);
|
||||
pref('zen.view.sidebar-expanded', true);
|
||||
pref('zen.view.sidebar-collapsed.hide-mute-button', true);
|
||||
pref('zen.view.experimental-force-window-controls-left', false);
|
||||
|
||||
#ifdef XP_MACOSX
|
||||
pref('zen.view.grey-out-inactive-windows', false);
|
||||
#else
|
||||
pref('zen.view.grey-out-inactive-windows', true);
|
||||
#endif
|
||||
|
||||
pref('zen.view.hide-window-controls', true);
|
||||
pref('zen.view.experimental-no-window-controls', false);
|
||||
|
||||
pref('zen.view.show-newtab-button-border-top', false);
|
||||
pref('zen.view.show-newtab-button-top', true);
|
||||
25
src/browser/app/profile/features/workspaces.inc
Normal file
25
src/browser/app/profile/features/workspaces.inc
Normal file
@@ -0,0 +1,25 @@
|
||||
// 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/.
|
||||
|
||||
pref('zen.workspaces.continue-where-left-off', false);
|
||||
pref('zen.workspaces.hide-default-container-indicator', true);
|
||||
pref('zen.workspaces.force-container-workspace', false);
|
||||
pref('zen.workspaces.open-new-tab-if-last-unpinned-tab-is-closed', false);
|
||||
pref('zen.workspaces.swipe-actions', true);
|
||||
pref('zen.workspaces.wrap-around-navigation', true);
|
||||
pref('zen.workspaces.natural-scroll', false);
|
||||
pref('zen.workspaces.scroll-modifier-key','ctrl'); // can be ctrl, alt, shift, or a meta key
|
||||
pref('services.sync.engine.workspaces', false);
|
||||
pref('zen.workspaces.container-specific-essentials-enabled', false);
|
||||
|
||||
#ifdef MOZILLA_OFFICIAL
|
||||
pref('zen.workspaces.debug', false);
|
||||
#else
|
||||
pref('zen.workspaces.debug', true);
|
||||
#endif
|
||||
|
||||
// Section: Pinned tabs management
|
||||
pref('zen.pinned-tab-manager.debug', false);
|
||||
pref('zen.pinned-tab-manager.restore-pinned-tabs-to-pinned-url', false);
|
||||
pref('zen.pinned-tab-manager.close-shortcut-behavior', 'reset-unload-switch');
|
||||
@@ -1,3 +1,6 @@
|
||||
// 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/.
|
||||
|
||||
pref("full-screen-api.transition-duration.enter", "0 0");
|
||||
pref("full-screen-api.transition-duration.leave", "0 0");
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
// 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/.
|
||||
|
||||
pref("widget.gtk.rounded-bottom-corners.enabled", true);
|
||||
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
// 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/.
|
||||
|
||||
// Enable transparent background for macos
|
||||
pref('widget.macos.titlebar-blend-mode.behind-window', true);
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
// 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/.
|
||||
|
||||
pref('image.jxl.enabled', true, locked);
|
||||
pref("svg.context-properties.content.enabled", true);
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
// 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/.
|
||||
|
||||
pref('browser.newtabpage.activity-stream.feeds.topsites', false);
|
||||
pref('browser.newtabpage.activity-stream.feeds.section.topstories', false);
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
// 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/.
|
||||
|
||||
pref('pdfjs.enableHighlightEditor', true);
|
||||
pref('pdfjs.enableHighlightFloatingButton', true);
|
||||
|
||||
@@ -1,38 +1,18 @@
|
||||
|
||||
// ---- Experimental settings to try make zen faster
|
||||
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);
|
||||
|
||||
pref("image.mem.decode_bytes_at_a_time", 32768);
|
||||
|
||||
// Enable GPU by default
|
||||
pref("gfx.canvas.accelerated", true);
|
||||
pref("media.hardware-video-decoding.enabled", true);
|
||||
pref("layers.gpu-process.enabled", true);
|
||||
// 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/.
|
||||
|
||||
#ifdef XP_MACOSX
|
||||
// Pref to control the reponse taken on macOS when the OS is under memory
|
||||
// pressure. Changes to the pref take effect immediately. Browser restart not
|
||||
// required. The pref value is a bitmask:
|
||||
// 0x0: No response (other than recording for telemetry, crash reporting)
|
||||
// 0x1: Use the tab unloading feature to reduce memory use. Requires that
|
||||
// the above "browser.tabs.unloadOnLowMemory" pref be set to true for tab
|
||||
// unloading to occur.
|
||||
// 0x2: Issue the internal "memory-pressure" notification to reduce memory use
|
||||
// 0x3: Both 0x1 and 0x2.
|
||||
pref("browser.lowMemoryResponseMask", 3);
|
||||
// Pref to control the reponse taken on macOS when the OS is under memory
|
||||
// pressure. Changes to the pref take effect immediately. Browser restart not
|
||||
// required. The pref value is a bitmask:
|
||||
// 0x0: No response (other than recording for telemetry, crash reporting)
|
||||
// 0x1: Use the tab unloading feature to reduce memory use. Requires that
|
||||
// the above "browser.tabs.unloadOnLowMemory" pref be set to true for tab
|
||||
// unloading to occur.
|
||||
// 0x2: Issue the internal "memory-pressure" notification to reduce memory use
|
||||
// 0x3: Both 0x1 and 0x2.
|
||||
pref("browser.lowMemoryResponseMask", 3);
|
||||
#endif
|
||||
|
||||
// Prefetching:
|
||||
pref("network.dns.disablePrefetch", false);
|
||||
pref("network.prefetch-next", true);
|
||||
pref("network.dns.disablePrefetchFromHTTPS", false);
|
||||
pref("network.predictor.enable-hover-on-ssl", true);
|
||||
pref("network.http.rcwn.enabled", false);
|
||||
|
||||
// Experimental Zen Features
|
||||
// Strategy to use for bytecode cache (Thanks https://github.com/gunir)
|
||||
pref('dom.script_loader.bytecode_cache.strategy', 2);
|
||||
pref("layout.css.grid-template-masonry-value.enabled", true);
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
// 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/.
|
||||
|
||||
pref("media.videocontrols.picture-in-picture.video-toggle.enabled", true);
|
||||
// TODO: Enable once we have a proper settings page
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
// 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/.
|
||||
|
||||
pref("datareporting.policy.dataSubmissionEnabled", false, locked);
|
||||
pref("datareporting.healthreport.uploadEnabled", false, locked);
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
// 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/.
|
||||
|
||||
pref("apz.overscroll.enabled", true);
|
||||
pref("general.smoothScroll", true);
|
||||
pref("general.smoothScroll.msdPhysics.enabled", true);
|
||||
pref("general.smoothScroll.currentVelocityWeighting", "0.15");
|
||||
pref("general.smoothScroll.stopDecelerationWeighting", "0.6");
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
// 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/.
|
||||
|
||||
pref('browser.urlbar.unitConversion.enabled', true);
|
||||
pref('browser.urlbar.trending.featureGate', false);
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
// 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/.
|
||||
|
||||
// Mica
|
||||
pref("widget.windows.mica", true);
|
||||
pref("widget.windows.mica.popups", true);
|
||||
pref("widget.windows.mica.toplevel-backdrop", 2);
|
||||
|
||||
pref("dom.ipc.processPriorityManager.backgroundUsesEcoQoS", false);
|
||||
|
||||
@@ -15,15 +15,15 @@ pref("intl.multilingual.downloadEnabled", false);
|
||||
pref('toolkit.legacyUserProfileCustomizations.stylesheets', true);
|
||||
|
||||
#ifdef XP_WIN
|
||||
#include windows.inc
|
||||
#include windows.inc
|
||||
#endif
|
||||
|
||||
#ifdef UNIX_BUT_NOT_MAC
|
||||
#include linux.inc
|
||||
#include linux.inc
|
||||
#endif
|
||||
|
||||
#ifdef XP_MACOSX
|
||||
#include macos.inc
|
||||
#include macos.inc
|
||||
#endif
|
||||
|
||||
#include urlbar.inc
|
||||
@@ -37,7 +37,7 @@ pref('toolkit.legacyUserProfileCustomizations.stylesheets', true);
|
||||
#include features.inc
|
||||
|
||||
#ifndef XP_MACOSX
|
||||
#include smoothscroll.inc
|
||||
#include smoothscroll.inc
|
||||
#endif
|
||||
|
||||
#include performance.inc
|
||||
|
||||
@@ -1,16 +1,8 @@
|
||||
diff --git a/browser/base/content/aboutDialog.xhtml b/browser/base/content/aboutDialog.xhtml
|
||||
index c64980810570fcea84e33fdc2d66ac42a79f4e46..6ef9bf4b88f0a0539d833f662c4dd890fd1fde93 100644
|
||||
index c64980810570fcea84e33fdc2d66ac42a79f4e46..11fe00e84dbac781b3da90abb1251c70bd3b094a 100644
|
||||
--- a/browser/base/content/aboutDialog.xhtml
|
||||
+++ b/browser/base/content/aboutDialog.xhtml
|
||||
@@ -35,6 +35,7 @@
|
||||
|
||||
<html:link rel="localization" href="branding/brand.ftl"/>
|
||||
<html:link rel="localization" href="browser/aboutDialog.ftl"/>
|
||||
+ <script src="chrome://browser/content/zenThemeModifier.js"></script>
|
||||
</linkset>
|
||||
|
||||
<html:div id="aboutDialogContainer">
|
||||
@@ -102,10 +103,6 @@
|
||||
@@ -102,10 +102,6 @@
|
||||
<label id="version" class="update"/>
|
||||
<label id="releasenotes" is="text-link" hidden="true" data-l10n-id="releaseNotes-link"/>
|
||||
</hbox>
|
||||
@@ -21,7 +13,7 @@ index c64980810570fcea84e33fdc2d66ac42a79f4e46..6ef9bf4b88f0a0539d833f662c4dd890
|
||||
</vbox>
|
||||
#endif
|
||||
</hbox>
|
||||
@@ -125,21 +122,17 @@
|
||||
@@ -125,21 +121,17 @@
|
||||
</description>
|
||||
</vbox>
|
||||
<description class="text-blurb" id="communityDesc" data-l10n-id="community-2">
|
||||
|
||||
@@ -1,12 +0,0 @@
|
||||
diff --git a/browser/base/content/aboutRestartRequired.xhtml b/browser/base/content/aboutRestartRequired.xhtml
|
||||
index c1f42b4ddd3b154a8643fc5265c556904805bdff..9722e7de76b02077addfeda90a9acd8b921a9cd6 100644
|
||||
--- a/browser/base/content/aboutRestartRequired.xhtml
|
||||
+++ b/browser/base/content/aboutRestartRequired.xhtml
|
||||
@@ -29,6 +29,7 @@
|
||||
/>
|
||||
<link rel="localization" href="branding/brand.ftl" />
|
||||
<link rel="localization" href="browser/aboutRestartRequired.ftl" />
|
||||
+ <script src="chrome://browser/content/zenThemeModifier.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<!-- PAGE CONTAINER (for styling purposes only) -->
|
||||
@@ -1,21 +1,20 @@
|
||||
diff --git a/browser/base/content/browser-init.js b/browser/base/content/browser-init.js
|
||||
index 3d5173315812589c0b79beec5f0419fc37cb8868..c4216db9e414fbbaead6ecd89b40366b0d8a50c1 100644
|
||||
index bcbfab4a3781ff3c7349115751b3830976eec4bf..b1b774e0d335ed3c5ca565a45cd624c7ea2718af 100644
|
||||
--- a/browser/base/content/browser-init.js
|
||||
+++ b/browser/base/content/browser-init.js
|
||||
@@ -175,6 +175,8 @@ var gBrowserInit = {
|
||||
@@ -186,6 +186,7 @@ var gBrowserInit = {
|
||||
},
|
||||
|
||||
onLoad() {
|
||||
+ Services.scriptloader.loadSubScript("chrome://browser/content/ZenStartup.mjs", window);
|
||||
+ Services.scriptloader.loadSubScript("chrome://browser/content/zenThemeModifier.js", window);
|
||||
gBrowser.addEventListener("DOMUpdateBlockedPopups", e =>
|
||||
PopupBlockerObserver.handleEvent(e)
|
||||
);
|
||||
@@ -310,6 +312,7 @@ var gBrowserInit = {
|
||||
TelemetryTimestamps.add("delayedStartupStarted");
|
||||
@@ -344,6 +345,7 @@ var gBrowserInit = {
|
||||
|
||||
this._cancelDelayedStartup();
|
||||
+ gZenWorkspaces.afterLoadInit();
|
||||
this._handleURIToLoad();
|
||||
|
||||
gBrowser.addEventListener(
|
||||
"PermissionStateChange",
|
||||
+ gZenWorkspaces.selectStartPage();
|
||||
Services.obs.addObserver(gIdentityHandler, "perm-changed");
|
||||
Services.obs.addObserver(gRemoteControl, "devtools-socket");
|
||||
Services.obs.addObserver(gRemoteControl, "marionette-listening");
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
diff --git a/browser/base/content/browser.js b/browser/base/content/browser.js
|
||||
index 6d664917a5a3bb1cea8a747e42e8bc0065ec999e..5059293ebfa29d646455b7a3505bd6eae408ba64 100644
|
||||
index 6d664917a5a3bb1cea8a747e42e8bc0065ec999e..dfacd5c40ef14319fe7398452c007f167003a583 100644
|
||||
--- a/browser/base/content/browser.js
|
||||
+++ b/browser/base/content/browser.js
|
||||
@@ -33,6 +33,7 @@ ChromeUtils.defineESModuleGetters(this, {
|
||||
@@ -39,3 +39,13 @@ index 6d664917a5a3bb1cea8a747e42e8bc0065ec999e..5059293ebfa29d646455b7a3505bd6ea
|
||||
}
|
||||
|
||||
return true;
|
||||
@@ -5717,6 +5722,9 @@ var ConfirmationHint = {
|
||||
MozXULElement.insertFTLIfNeeded("toolkit/branding/brandings.ftl");
|
||||
MozXULElement.insertFTLIfNeeded("browser/confirmationHints.ftl");
|
||||
document.l10n.setAttributes(this._message, messageId, options.l10nArgs);
|
||||
+ if (window.gZenUIManager?.showToast) {
|
||||
+ return window.gZenUIManager.showToast(messageId, options);
|
||||
+ }
|
||||
if (options.descriptionId) {
|
||||
document.l10n.setAttributes(this._description, options.descriptionId);
|
||||
this._description.hidden = false;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
diff --git a/browser/base/content/browser.xhtml b/browser/base/content/browser.xhtml
|
||||
index 8f8c5536cb6e54300897180ca3f950974c60e930..403f821f561a2dfcf6ad23db7e61712aac867716 100644
|
||||
index 8f8c5536cb6e54300897180ca3f950974c60e930..78076e29faf749b83d6c8e099af6767621f34d58 100644
|
||||
--- a/browser/base/content/browser.xhtml
|
||||
+++ b/browser/base/content/browser.xhtml
|
||||
@@ -26,6 +26,7 @@
|
||||
@@ -10,19 +10,18 @@ index 8f8c5536cb6e54300897180ca3f950974c60e930..403f821f561a2dfcf6ad23db7e61712a
|
||||
persist="screenX screenY width height sizemode"
|
||||
data-l10n-sync="true">
|
||||
<head>
|
||||
@@ -105,8 +106,11 @@
|
||||
@@ -105,8 +106,10 @@
|
||||
|
||||
<title data-l10n-id="browser-main-window-default-title"></title>
|
||||
|
||||
+#include zen-preloaded.inc.xhtml
|
||||
+
|
||||
<script src="chrome://browser/content/global-scripts.js"></script>
|
||||
<script src="chrome://browser/content/browser-main.js"></script>
|
||||
+#include zen-assets.inc.xhtml
|
||||
</head>
|
||||
<html:body xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
|
||||
# All sets except for popupsets (commands, keys, and stringbundles)
|
||||
@@ -128,9 +132,11 @@
|
||||
@@ -128,9 +131,11 @@
|
||||
</vbox>
|
||||
</html:template>
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
diff --git a/browser/base/content/navigator-toolbox.inc.xhtml b/browser/base/content/navigator-toolbox.inc.xhtml
|
||||
index 00c8976d3e258c0875d7da2f3ec823d8907a84c9..cc61d5a845b5ce22a61f5a1aab8b280b2bcdf101 100644
|
||||
index 30e7b9b2ac63db6ccd2727a9341081cecefc25cb..ceff29d10a32fe9e5296340c8c56a2fdbf321c31 100644
|
||||
--- a/browser/base/content/navigator-toolbox.inc.xhtml
|
||||
+++ b/browser/base/content/navigator-toolbox.inc.xhtml
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
# 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/.
|
||||
|
||||
#include zen-locales.inc.xhtml
|
||||
|
||||
# Styles used all over the browser
|
||||
@@ -28,16 +32,28 @@
|
||||
<link rel="stylesheet" type="text/css" href="chrome://browser/content/zen-styles/zen-download-box-animation.css" />
|
||||
</linkset>
|
||||
|
||||
# Startup "preloaded" scripts that requre globals such as gBrowser and gURLBar
|
||||
# JS files which are needed by browser.xhtml but no other top level windows to
|
||||
# support MacOS specific features should be loaded directly from browser-main.js
|
||||
# rather than this file.
|
||||
#
|
||||
# If you update this list, you may need to add a mapping within the following
|
||||
# file so that ESLint works correctly:
|
||||
# tools/lint/eslint/eslint-plugin-mozilla/lib/environments/browser-window.js
|
||||
<script type="text/javascript" src="chrome://browser/content/ZenPreloadedScripts.js"></script>
|
||||
|
||||
# Scripts used all over the browser
|
||||
<script src="chrome://browser/content/ZenUIManager.mjs"></script>
|
||||
<script src="chrome://browser/content/zen-components/ZenFolders.mjs"></script>
|
||||
<script src="chrome://browser/content/zen-components/ZenMods.mjs"></script>
|
||||
<script src="chrome://browser/content/zen-components/ZenCompactMode.mjs"></script>
|
||||
<script src="chrome://browser/content/zen-components/ZenPinnedTabsStorage.mjs"></script>
|
||||
<script src="chrome://browser/content/zen-components/ZenWorkspacesStorage.mjs"></script>
|
||||
<script src="chrome://browser/content/zen-components/ZenPinnedTabManager.mjs"></script>
|
||||
<script src="chrome://browser/content/zen-components/ZenGradientGenerator.mjs"></script>
|
||||
<script src="chrome://browser/content/zen-components/ZenViewSplitter.mjs"></script>
|
||||
<script src="chrome://browser/content/zen-components/ZenGlanceManager.mjs"></script>
|
||||
<script src="chrome://browser/content/zen-components/ZenMediaController.mjs"></script>
|
||||
<script src="chrome://browser/content/zen-components/ZenDownloadAnimation.mjs"></script>
|
||||
<script type="text/javascript" src="chrome://browser/content/ZenUIManager.mjs"></script>
|
||||
<script type="text/javascript" src="chrome://browser/content/zen-components/ZenFolders.mjs"></script>
|
||||
<script type="text/javascript" src="chrome://browser/content/zen-components/ZenMods.mjs"></script>
|
||||
<script type="text/javascript" src="chrome://browser/content/zen-components/ZenCompactMode.mjs"></script>
|
||||
<script type="text/javascript" src="chrome://browser/content/zen-components/ZenPinnedTabsStorage.mjs"></script>
|
||||
<script type="text/javascript" src="chrome://browser/content/zen-components/ZenWorkspacesStorage.mjs"></script>
|
||||
<script type="text/javascript" src="chrome://browser/content/zen-components/ZenPinnedTabManager.mjs"></script>
|
||||
<script type="text/javascript" src="chrome://browser/content/zen-components/ZenGradientGenerator.mjs"></script>
|
||||
<script type="text/javascript" src="chrome://browser/content/zen-components/ZenViewSplitter.mjs"></script>
|
||||
<script type="text/javascript" src="chrome://browser/content/zen-components/ZenGlanceManager.mjs"></script>
|
||||
<script type="text/javascript" src="chrome://browser/content/zen-components/ZenMediaController.mjs"></script>
|
||||
<script type="text/javascript" src="chrome://browser/content/zen-components/ZenDownloadAnimation.mjs"></script>
|
||||
<script type="text/javascript" src="chrome://browser/content/zen-components/ZenEmojiPicker.mjs"></script>
|
||||
<script type="text/javascript" src="chrome://browser/content/zen-components/ZenWorkspaceCreation.mjs"></script>
|
||||
|
||||
@@ -1,15 +1,19 @@
|
||||
|
||||
# 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/.
|
||||
|
||||
content/browser/zenThemeModifier.js (../../zen/common/zenThemeModifier.js)
|
||||
content/browser/ZenStartup.mjs (../../zen/common/ZenStartup.mjs)
|
||||
content/browser/ZenPreloadedScripts.js (../../zen/common/ZenPreloadedScripts.js)
|
||||
content/browser/zen-sets.js (../../zen/common/zen-sets.js)
|
||||
content/browser/ZenUIManager.mjs (../../zen/common/ZenUIManager.mjs)
|
||||
content/browser/zen-components/ZenActorsManager.mjs (../../zen/common/ZenActorsManager.mjs)
|
||||
content/browser/zen-components/ZenEmojies.mjs (../../zen/common/ZenEmojies.mjs)
|
||||
content/browser/ZenCustomizableUI.sys.mjs (../../zen/common/ZenCustomizableUI.sys.mjs)
|
||||
content/browser/zen-components/ZenUIMigration.mjs (../../zen/common/ZenUIMigration.mjs)
|
||||
content/browser/zen-components/ZenCommonUtils.mjs (../../zen/common/ZenCommonUtils.mjs)
|
||||
content/browser/zen-components/ZenSessionStore.mjs (../../zen/common/ZenSessionStore.mjs)
|
||||
content/browser/zen-components/ZenEmojisData.min.mjs (../../zen/common/emojis/ZenEmojisData.min.mjs)
|
||||
content/browser/zen-components/ZenEmojiPicker.mjs (../../zen/common/emojis/ZenEmojiPicker.mjs)
|
||||
|
||||
content/browser/zen-styles/zen-theme.css (../../zen/common/styles/zen-theme.css)
|
||||
content/browser/zen-styles/zen-buttons.css (../../zen/common/styles/zen-buttons.css)
|
||||
@@ -35,11 +39,12 @@
|
||||
content/browser/zen-components/ZenViewSplitter.mjs (../../zen/split-view/ZenViewSplitter.mjs)
|
||||
content/browser/zen-styles/zen-decks.css (../../zen/split-view/zen-decks.css)
|
||||
|
||||
content/browser/zen-components/ZenMods.mjs (../../zen/mods/ZenMods.mjs)
|
||||
content/browser/zen-components/ZenMods.mjs (../../zen/mods/ZenMods.mjs)
|
||||
|
||||
content/browser/zen-components/ZenWorkspaceIcons.mjs (../../zen/workspaces/ZenWorkspaceIcons.mjs)
|
||||
content/browser/zen-components/ZenWorkspace.mjs (../../zen/workspaces/ZenWorkspace.mjs)
|
||||
content/browser/zen-components/ZenWorkspaces.mjs (../../zen/workspaces/ZenWorkspaces.mjs)
|
||||
content/browser/zen-components/ZenWorkspaceCreation.mjs (../../zen/workspaces/ZenWorkspaceCreation.mjs)
|
||||
content/browser/zen-components/ZenWorkspacesStorage.mjs (../../zen/workspaces/ZenWorkspacesStorage.mjs)
|
||||
content/browser/zen-components/ZenWorkspacesSync.mjs (../../zen/workspaces/ZenWorkspacesSync.mjs)
|
||||
content/browser/zen-components/ZenGradientGenerator.mjs (../../zen/workspaces/ZenGradientGenerator.mjs)
|
||||
@@ -80,7 +85,7 @@
|
||||
content/browser/zen-images/note-indicator.svg (../../zen/images/note-indicator.svg)
|
||||
|
||||
content/browser/zen-images/downloads/download.svg (../../zen/images/downloads/download.svg)
|
||||
content/browser/zen-images/downloads/archive.svg (../../zen/images/downloads/archive.svg)
|
||||
content/browser/zen-images/downloads/archive.svg (../../zen/images/downloads/archive.svg)
|
||||
|
||||
# Fonts
|
||||
content/browser/zen-fonts/JunicodeVF-Italic.woff2 (../../zen/fonts/JunicodeVF-Italic.woff2)
|
||||
@@ -91,13 +96,13 @@
|
||||
content/browser/zen-vendor/motion.min.mjs (../../zen/vendor/motion.min.mjs)
|
||||
|
||||
# FavIcons for startup
|
||||
content/browser/zen-images/favicons/calendar.ico (../../zen/images/favicons/calendar.ico)
|
||||
content/browser/zen-images/favicons/discord.ico (../../zen/images/favicons/discord.ico)
|
||||
content/browser/zen-images/favicons/figma.ico (../../zen/images/favicons/figma.ico)
|
||||
content/browser/zen-images/favicons/github.ico (../../zen/images/favicons/github.ico)
|
||||
content/browser/zen-images/favicons/notion.ico (../../zen/images/favicons/notion.ico)
|
||||
content/browser/zen-images/favicons/obsidian.ico (../../zen/images/favicons/obsidian.ico)
|
||||
content/browser/zen-images/favicons/slack.ico (../../zen/images/favicons/slack.ico)
|
||||
content/browser/zen-images/favicons/reddit.ico (../../zen/images/favicons/reddit.ico)
|
||||
content/browser/zen-images/favicons/x.ico (../../zen/images/favicons/x.ico)
|
||||
content/browser/zen-images/favicons/trello.ico (../../zen/images/favicons/trello.ico)
|
||||
content/browser/zen-images/favicons/calendar.ico (../../zen/images/favicons/calendar.ico)
|
||||
content/browser/zen-images/favicons/discord.ico (../../zen/images/favicons/discord.ico)
|
||||
content/browser/zen-images/favicons/figma.ico (../../zen/images/favicons/figma.ico)
|
||||
content/browser/zen-images/favicons/github.ico (../../zen/images/favicons/github.ico)
|
||||
content/browser/zen-images/favicons/notion.ico (../../zen/images/favicons/notion.ico)
|
||||
content/browser/zen-images/favicons/obsidian.ico (../../zen/images/favicons/obsidian.ico)
|
||||
content/browser/zen-images/favicons/slack.ico (../../zen/images/favicons/slack.ico)
|
||||
content/browser/zen-images/favicons/reddit.ico (../../zen/images/favicons/reddit.ico)
|
||||
content/browser/zen-images/favicons/x.ico (../../zen/images/favicons/x.ico)
|
||||
content/browser/zen-images/favicons/trello.ico (../../zen/images/favicons/trello.ico)
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
# 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/.
|
||||
|
||||
<commandset id="zenCommandSet">
|
||||
<command id="cmd_zenCompactModeToggle" />
|
||||
<command id="cmd_zenCompactModeShowSidebar" />
|
||||
@@ -33,8 +37,14 @@
|
||||
<command id="cmd_zenToggleTabsOnRight" />
|
||||
|
||||
<command id="cmd_zenReplacePinnedUrlWithCurrent" />
|
||||
<command id="cmd_zenAddToEssentials" />
|
||||
<command id="cmd_zenRemoveFromEssentials" />
|
||||
<command id="cmd_contextZenAddToEssentials" />
|
||||
<command id="cmd_contextZenRemoveFromEssentials" />
|
||||
|
||||
<command id="cmd_zenCtxDeleteWorkspace" />
|
||||
<command id="cmd_zenChangeWorkspaceName" />
|
||||
<command id="cmd_zenChangeWorkspaceIcon" />
|
||||
<command id="cmd_zenReorderWorkspaces" />
|
||||
<command id="cmd_zenOpenWorkspaceCreation" />
|
||||
|
||||
<command id="cmd_zenPinnedTabReset" />
|
||||
<command id="cmd_zenPinnedTabResetNoTab" />
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
# 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/.
|
||||
|
||||
<link rel="localization" href="browser/zen-workspaces.ftl"/>
|
||||
<link rel="localization" href="browser/zen-split-view.ftl"/>
|
||||
|
||||
11
src/browser/base/content/zen-panels/emojis-picker.inc
Normal file
11
src/browser/base/content/zen-panels/emojis-picker.inc
Normal file
@@ -0,0 +1,11 @@
|
||||
# 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/.
|
||||
|
||||
<panel type="arrow" orient="vertical" id="PanelUI-zen-emojis-picker" position="bottomright topright" side="bottom">
|
||||
<hbox id="PanelUI-zen-emojis-picker-header">
|
||||
<html:input type="search" id="PanelUI-zen-emojis-picker-search" placeholder="Search emojis" />
|
||||
<toolbarbutton id="PanelUI-zen-emojis-picker-none" class="toolbarbutton-1" />
|
||||
</hbox>
|
||||
<hbox id="PanelUI-zen-emojis-picker-list" />
|
||||
</panel>
|
||||
61
src/browser/base/content/zen-panels/gradient-generator.inc
Normal file
61
src/browser/base/content/zen-panels/gradient-generator.inc
Normal file
@@ -0,0 +1,61 @@
|
||||
# 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/.
|
||||
|
||||
<panel flip="side" type="arrow" popupalign="center" orient="vertical" id="PanelUI-zen-gradient-generator" position="bottomright topright" mainview="true" side="left">
|
||||
<panelmultiview id="PanelUI-zen-gradient-generator-multiview" mainViewId="PanelUI-zen-gradient-generator-view">
|
||||
<panelview id="PanelUI-zen-gradient-generator-view" class="PanelUI-subView zen-theme-picker" role="document" mainview-with-header="true" has-custom-header="true">
|
||||
<hbox>
|
||||
<hbox id="PanelUI-zen-gradient-generator-predefined">
|
||||
<box data-algo="analogous" data-num-dots="3" data-position="219,99" style="background: linear-gradient(135deg, rgb(117, 255, 136), rgb(60, 66, 58));"></box>
|
||||
<box data-algo="analogous" data-num-dots="3" data-position="167,201" style="background: linear-gradient(135deg, #a03fe0, #382b5c);"></box>
|
||||
<box data-algo="analogous" data-num-dots="3" data-position="90,170" style="background: linear-gradient(135deg, #c57aa3, #af824f);"></box>
|
||||
<box data-algo="splitComplementary" data-num-dots="3" data-position="83,103" style="background: linear-gradient(135deg, #1e90ff, #968a4a);"></box>
|
||||
<box data-algo="analogous" data-num-dots="3" data-position="186,186" style="background: linear-gradient(135deg, #a07a48, #ab80e4);"></box>
|
||||
<box data-algo="float" data-num-dots="1" data-position="196,176" style="background: #7bcbda;"></box>
|
||||
<box data-algo="float" data-num-dots="1" data-position="116,167" style="background: #be9ac9;"></box>
|
||||
<box data-algo="float" data-num-dots="1" data-position="122,110" style="background: #cdcea1;"></box>
|
||||
<box data-algo="float" data-num-dots="1" data-position="181,83" style="background: #6ac593;"></box>
|
||||
<box data-algo="complementary" data-num-dots="2" data-position="82,112" style="background: linear-gradient(135deg, #1e90ff, #cfb179);"></box>
|
||||
</hbox>
|
||||
</hbox>
|
||||
<hbox class="zen-theme-picker-gradient">
|
||||
<box id="PanelUI-zen-gradient-generator-rotation-dot"></box>
|
||||
<box id="PanelUI-zen-gradient-generator-rotation-line"></box>
|
||||
<box id="PanelUI-zen-gradient-generator-color-actions">
|
||||
<button id="PanelUI-zen-gradient-generator-color-add" class="subviewbutton">
|
||||
</button>
|
||||
<button id="PanelUI-zen-gradient-generator-color-remove" class="subviewbutton">
|
||||
</button>
|
||||
<html:div class="separator"></html:div>
|
||||
<button id="PanelUI-zen-gradient-generator-color-toggle-algo" class="subviewbutton" data-l10n-id="zen-panel-ui-gradient-generator-algo-floating">
|
||||
</button>
|
||||
</box>
|
||||
<label data-l10n-id="zen-panel-ui-gradient-click-to-add" id="PanelUI-zen-gradient-generator-color-click-to-add"></label>
|
||||
</hbox>
|
||||
<hbox id="PanelUI-zen-gradient-generator-controls">
|
||||
<hbox id="PanelUI-zen-gradient-colors-wrapper">
|
||||
<vbox flex="1">
|
||||
<label data-l10n-id="zen-panel-ui-gradient-generator-opacity-text"></label>
|
||||
<html:input type="range" min="0" max="1" value="0.5" step="0.05" id="PanelUI-zen-gradient-generator-opacity" />
|
||||
</vbox>
|
||||
<vbox id="PanelUI-zen-gradient-generator-texture-wrapper">
|
||||
</vbox>
|
||||
</hbox>
|
||||
</hbox>
|
||||
<vbox id="PanelUI-zen-gradient-generator-custom-colors">
|
||||
<vbox id="zen-theme-picker-color">
|
||||
<label data-l10n-id="zen-panel-ui-gradient-generator-custom-color"></label>
|
||||
<hbox>
|
||||
<html:input type="text" placeholder="#000000" id="PanelUI-zen-gradient-generator-custom-input" />
|
||||
<toolbarbutton id="PanelUI-zen-gradient-generator-color-custom-add" class="subviewbutton">
|
||||
<image></image>
|
||||
</toolbarbutton>
|
||||
</hbox>
|
||||
</vbox>
|
||||
<vbox id="PanelUI-zen-gradient-generator-custom-list">
|
||||
</vbox>
|
||||
</vbox>
|
||||
</panelview>
|
||||
</panelmultiview>
|
||||
</panel>
|
||||
31
src/browser/base/content/zen-panels/popups.inc
Normal file
31
src/browser/base/content/zen-panels/popups.inc
Normal file
@@ -0,0 +1,31 @@
|
||||
# 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/.
|
||||
|
||||
<menupopup id="zenCreateNewPopup">
|
||||
<menuitem data-l10n-id="tabs-toolbar-new-tab" command="cmd_newNavigatorTab" image="chrome://browser/skin/zen-icons/plus.svg" />
|
||||
<menuseparator/>
|
||||
<menuitem data-l10n-id="zen-panel-ui-workspaces-create" command="cmd_zenOpenWorkspaceCreation" image="chrome://browser/skin/zen-icons/duplicate-tab.svg" />
|
||||
</menupopup>
|
||||
|
||||
<menupopup id="zenWorkspaceMoreActions">
|
||||
<menuitem id="context_zenEditWorkspace" data-l10n-id="zen-workspaces-panel-change-name" command="cmd_zenChangeWorkspaceName"/>
|
||||
<menuitem id="context_zenEditWorkspaceIcon" data-l10n-id="zen-workspaces-panel-change-icon" command="cmd_zenChangeWorkspaceIcon"/>
|
||||
<menuitem class="zenToolbarThemePicker"
|
||||
id="context_zenChangeWorkspaceTheme"
|
||||
data-l10n-id="zen-workspaces-change-theme"
|
||||
command="cmd_zenOpenZenThemePicker"/>
|
||||
<menu id="context_zenWorkspacesOpenInContainerTab"
|
||||
data-l10n-id="zen-workspaces-panel-context-default-profile"
|
||||
selection-type="single"
|
||||
node-type="link"
|
||||
hide-if-private-browsing="true"
|
||||
hide-if-usercontext-disabled="true">
|
||||
<menupopup />
|
||||
</menu>
|
||||
<menuseparator/>
|
||||
<menuitem id="context_zenReorderWorkspaces" data-l10n-id="zen-workspaces-panel-context-reorder" command="cmd_zenReorderWorkspaces"/>
|
||||
<menuseparator/>
|
||||
<menuitem data-l10n-id="zen-panel-ui-workspaces-create" command="cmd_zenOpenWorkspaceCreation"/>
|
||||
<menuitem id="context_zenDeleteWorkspace" data-l10n-id="zen-workspaces-panel-context-delete" command="cmd_zenCtxDeleteWorkspace"/>
|
||||
</menupopup>
|
||||
@@ -1,131 +1,8 @@
|
||||
# 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/.
|
||||
|
||||
<panel flip="side" type="arrow" orient="vertical" id="PanelUI-zen-gradient-generator" position="bottomright topright" mainview="true" side="left">
|
||||
<panelmultiview id="PanelUI-zen-gradient-generator-multiview" mainViewId="PanelUI-zen-gradient-generator-view">
|
||||
<panelview id="PanelUI-zen-gradient-generator-view" class="PanelUI-subView zen-theme-picker" role="document" mainview-with-header="true" has-custom-header="true">
|
||||
<hbox>
|
||||
<hbox id="PanelUI-zen-gradient-generator-predefined">
|
||||
<box data-algo="analogous" data-num-dots="3" data-position="219,99" style="background: linear-gradient(135deg, rgb(117, 255, 136), rgb(60, 66, 58));"></box>
|
||||
<box data-algo="analogous" data-num-dots="3" data-position="167,201" style="background: linear-gradient(135deg, #a03fe0, #382b5c);"></box>
|
||||
<box data-algo="analogous" data-num-dots="3" data-position="90,170" style="background: linear-gradient(135deg, #c57aa3, #af824f);"></box>
|
||||
<box data-algo="splitComplementary" data-num-dots="3" data-position="83,103" style="background: linear-gradient(135deg, #1e90ff, #968a4a);"></box>
|
||||
<box data-algo="analogous" data-num-dots="3" data-position="186,186" style="background: linear-gradient(135deg, #a07a48, #ab80e4);"></box>
|
||||
<box data-algo="float" data-num-dots="1" data-position="196,176" style="background: #7bcbda;"></box>
|
||||
<box data-algo="float" data-num-dots="1" data-position="116,167" style="background: #be9ac9;"></box>
|
||||
<box data-algo="float" data-num-dots="1" data-position="122,110" style="background: #cdcea1;"></box>
|
||||
<box data-algo="float" data-num-dots="1" data-position="181,83" style="background: #6ac593;"></box>
|
||||
<box data-algo="complementary" data-num-dots="2" data-position="82,112" style="background: linear-gradient(135deg, #1e90ff, #cfb179);"></box>
|
||||
</hbox>
|
||||
</hbox>
|
||||
<hbox class="zen-theme-picker-gradient">
|
||||
<box id="PanelUI-zen-gradient-generator-rotation-dot"></box>
|
||||
<box id="PanelUI-zen-gradient-generator-rotation-line"></box>
|
||||
<box id="PanelUI-zen-gradient-generator-color-actions">
|
||||
<button id="PanelUI-zen-gradient-generator-color-add" class="subviewbutton">
|
||||
</button>
|
||||
<button id="PanelUI-zen-gradient-generator-color-remove" class="subviewbutton">
|
||||
</button>
|
||||
<html:div class="separator"></html:div>
|
||||
<button id="PanelUI-zen-gradient-generator-color-toggle-algo" class="subviewbutton" data-l10n-id="zen-panel-ui-gradient-generator-algo-floating">
|
||||
</button>
|
||||
</box>
|
||||
<label data-l10n-id="zen-panel-ui-gradient-click-to-add" id="PanelUI-zen-gradient-generator-color-click-to-add"></label>
|
||||
</hbox>
|
||||
<hbox id="PanelUI-zen-gradient-generator-controls">
|
||||
<hbox id="PanelUI-zen-gradient-colors-wrapper">
|
||||
<vbox flex="1">
|
||||
<label data-l10n-id="zen-panel-ui-gradient-generator-opacity-text"></label>
|
||||
<html:input type="range" min="0" max="1" value="0.5" step="0.05" id="PanelUI-zen-gradient-generator-opacity" />
|
||||
</vbox>
|
||||
<vbox id="PanelUI-zen-gradient-generator-texture-wrapper">
|
||||
</vbox>
|
||||
</hbox>
|
||||
</hbox>
|
||||
<vbox id="PanelUI-zen-gradient-generator-custom-colors">
|
||||
<vbox id="zen-theme-picker-color">
|
||||
<label data-l10n-id="zen-panel-ui-gradient-generator-custom-color"></label>
|
||||
<hbox>
|
||||
<html:input type="text" placeholder="#000000" id="PanelUI-zen-gradient-generator-custom-input" />
|
||||
<toolbarbutton id="PanelUI-zen-gradient-generator-color-custom-add" class="subviewbutton">
|
||||
<image></image>
|
||||
</toolbarbutton>
|
||||
</hbox>
|
||||
</vbox>
|
||||
<vbox id="PanelUI-zen-gradient-generator-custom-list">
|
||||
</vbox>
|
||||
</vbox>
|
||||
</panelview>
|
||||
</panelmultiview>
|
||||
</panel>
|
||||
#include zen-panels/gradient-generator.inc
|
||||
#include zen-panels/emojis-picker.inc
|
||||
|
||||
<panel flip="slide" type="arrow" orient="vertical" id="PanelUI-zen-workspaces" position="bottomright topright" mainview="true" side="left">
|
||||
<panelmultiview id="PanelUI-zen-workspaces-multiview" mainViewId="PanelUI-zen-workspaces-view">
|
||||
<panelview id="PanelUI-zen-workspaces-view" class="PanelUI-subView" role="document" mainview-with-header="true" has-custom-header="true" closemenu="none">
|
||||
<vbox>
|
||||
<hbox>
|
||||
<h3 data-l10n-id="zen-panel-ui-workspaces-text" id="PanelUI-zen-workspaces-header"></h3>
|
||||
<toolbarbutton id="PanelUI-zen-workspaces-reorder-mode" class="subviewbutton">
|
||||
<image></image>
|
||||
</toolbarbutton>
|
||||
<toolbarbutton id="PanelUI-zen-workspaces-new" class="subviewbutton">
|
||||
<image></image>
|
||||
</toolbarbutton>
|
||||
</hbox>
|
||||
</vbox>
|
||||
<html:div id="PanelUI-zen-workspaces-list">
|
||||
</html:div>
|
||||
</panelview>
|
||||
<panelview id="PanelUI-zen-workspaces-create" class="PanelUI-subView" role="document" mainview-with-header="true" has-custom-header="true">
|
||||
<vbox class="PanelUI-zen-workspaces-user-create">
|
||||
<h1 data-l10n-id="zen-panel-ui-workspaces-create-text"></h1>
|
||||
<hbox class="PanelUI-zen-workspaces-creation-wraper">
|
||||
<hbox class="PanelUI-zen-workspaces-icons-container create"></hbox>
|
||||
<html:input autofocus="true" id="PanelUI-zen-workspaces-create-input" type="text" placeholder="Enter workspace name" />
|
||||
</hbox>
|
||||
</vbox>
|
||||
<html:moz-button-group class="panel-footer" id="PanelUI-zen-workspaces-create-footer">
|
||||
<button disabled="true" default="true" slot="primary" id="PanelUI-zen-workspaces-create-save" class="footer-button" data-l10n-id="zen-panel-ui-workspaces-create-save">
|
||||
</button>
|
||||
<button id="PanelUI-zen-workspaces-create-cancel" class="footer-button" data-l10n-id="zen-panel-ui-workspaces-create-cancel">
|
||||
</button>
|
||||
</html:moz-button-group>
|
||||
</panelview>
|
||||
<panelview id="PanelUI-zen-workspaces-edit" class="PanelUI-subView" role="document" mainview-with-header="true" has-custom-header="true">
|
||||
<vbox class="PanelUI-zen-workspaces-user-create">
|
||||
<h1 data-l10n-id="zen-panel-ui-workspaces-edit-text"></h1>
|
||||
<hbox class="PanelUI-zen-workspaces-creation-wraper">
|
||||
<hbox class="PanelUI-zen-workspaces-icons-container edit"></hbox>
|
||||
<html:input autofocus="true" id="PanelUI-zen-workspaces-edit-input" type="text" placeholder="Enter workspace name" />
|
||||
</hbox>
|
||||
</vbox>
|
||||
<html:moz-button-group class="panel-footer" id="PanelUI-zen-workspaces-edit-footer">
|
||||
<button disabled="true" default="true" slot="primary" id="PanelUI-zen-workspaces-edit-save" class="footer-button" data-l10n-id="zen-panel-ui-workspaces-edit-save">
|
||||
</button>
|
||||
<button id="PanelUI-zen-workspaces-edit-cancel" class="footer-button" data-l10n-id="zen-panel-ui-workspaces-edit-cancel">
|
||||
</button>
|
||||
</html:moz-button-group>
|
||||
</panelview>
|
||||
<panelview id="PanelUI-zen-workspaces-icon-picker" class="PanelUI-subView" role="document" mainview-with-header="true" has-custom-header="true">
|
||||
<vbox id="PanelUI-zen-workspaces-icon-picker-wrapper">
|
||||
<html:div id="PanelUI-zen-workspaces-icon-search-bar">
|
||||
<html:input autofocus="true" type="text" id="PanelUI-zen-workspaces-icon-search-input"/>
|
||||
</html:div>
|
||||
</vbox>
|
||||
</panelview>
|
||||
</panelmultiview>
|
||||
</panel>
|
||||
|
||||
<menupopup id="zenWorkspaceActionsMenu">
|
||||
<menuitem id="context_zenOpenWorkspace" data-l10n-id="zen-workspaces-panel-context-open"/>
|
||||
<menuseparator/>
|
||||
<menuitem id="context_zenEditWorkspace" data-l10n-id="zen-workspaces-panel-context-edit"/>
|
||||
<menu id="context_zenWorkspacesOpenInContainerTab"
|
||||
data-l10n-id="zen-workspaces-panel-context-open-in-container-tab"
|
||||
selection-type="single"
|
||||
node-type="link"
|
||||
hide-if-private-browsing="true"
|
||||
hide-if-usercontext-disabled="true">
|
||||
<menupopup />
|
||||
</menu>
|
||||
<menuseparator/>
|
||||
<menuitem id="context_zenDeleteWorkspace" data-l10n-id="zen-workspaces-panel-context-delete"/>
|
||||
</menupopup>
|
||||
#include zen-panels/popups.inc
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
# 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/.
|
||||
|
||||
# This needs to be here, before all the other scripts, because it's used before
|
||||
# the window is fully loaded.
|
||||
# Make sure they are loaded before the global-scripts.inc file.
|
||||
@@ -10,4 +14,3 @@
|
||||
<script type="text/javascript" src="chrome://browser/content/zen-components/ZenWorkspacesSync.mjs"></script>
|
||||
<script type="text/javascript" src="chrome://browser/content/zen-components/ZenActorsManager.mjs"></script>
|
||||
<script type="text/javascript" src="chrome://browser/content/zen-components/ZenSessionStore.mjs"></script>
|
||||
|
||||
|
||||
@@ -1,6 +1,11 @@
|
||||
# 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/.
|
||||
|
||||
#include ../../../zen/media/zen-media-controls.inc.xhtml
|
||||
|
||||
<toolbar brighttext="true"
|
||||
id="zen-sidebar-bottom-buttons"
|
||||
id="zen-sidebar-foot-buttons"
|
||||
fullscreentoolbar="true"
|
||||
class="browser-toolbar customization-target"
|
||||
data-l10n-id="tabs-toolbar"
|
||||
@@ -10,4 +15,5 @@
|
||||
mode="icons">
|
||||
<toolbarbutton removable="true" class="chromeclass-toolbar-additional toolbarbutton-1 zen-sidebar-action-button" id="zen-expand-sidebar-button" command="cmd_zenToggleSidebar" data-l10n-id="sidebar-zen-expand"></toolbarbutton>
|
||||
<zen-workspace-icons id="zen-workspaces-button" overflows="false" removable="false"></zen-workspace-icons>
|
||||
<toolbarbutton removable="true" class="chromeclass-toolbar-additional toolbarbutton-1 zen-sidebar-action-button" id="zen-create-new-button" context="zenCreateNewPopup" data-l10n-id="sidebar-zen-create-new"></toolbarbutton>
|
||||
</toolbar>
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
# 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/.
|
||||
|
||||
<vbox id="zen-toast-container"></vbox>
|
||||
|
||||
#include ../../../zen/split-view/zen-splitview-overlay.inc.xhtml
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
diff --git a/browser/components/customizableui/content/panelUI.js b/browser/components/customizableui/content/panelUI.js
|
||||
index 689205034d9df67ff1fe0ebbf4a3481a5f414391..2626b7286deb51f66b6ccbbc32d510139cacb109 100644
|
||||
index 689205034d9df67ff1fe0ebbf4a3481a5f414391..2fab7474f1038a7a3cd2f4b4798d59696900cc85 100644
|
||||
--- a/browser/components/customizableui/content/panelUI.js
|
||||
+++ b/browser/components/customizableui/content/panelUI.js
|
||||
@@ -516,8 +516,7 @@ const PanelUI = {
|
||||
@@ -12,7 +12,20 @@ index 689205034d9df67ff1fe0ebbf4a3481a5f414391..2626b7286deb51f66b6ccbbc32d51013
|
||||
.appendChild(tempPanel);
|
||||
|
||||
let multiView = document.createXULElement("panelmultiview");
|
||||
@@ -959,7 +958,7 @@ const PanelUI = {
|
||||
@@ -608,10 +607,12 @@ const PanelUI = {
|
||||
if (hasKids && !this.navbar.hasAttribute("nonemptyoverflow")) {
|
||||
this.navbar.setAttribute("nonemptyoverflow", "true");
|
||||
this.overflowPanel.setAttribute("hasfixeditems", "true");
|
||||
+ window.document.getElementById("zen-sidebar-top-buttons").setAttribute("nonemptyoverflow", "true");
|
||||
} else if (!hasKids && this.navbar.hasAttribute("nonemptyoverflow")) {
|
||||
PanelMultiView.hidePopup(this.overflowPanel);
|
||||
this.overflowPanel.removeAttribute("hasfixeditems");
|
||||
this.navbar.removeAttribute("nonemptyoverflow");
|
||||
+ window.document.getElementById("zen-sidebar-top-buttons").removeAttribute("nonemptyoverflow");
|
||||
}
|
||||
},
|
||||
|
||||
@@ -959,7 +960,7 @@ const PanelUI = {
|
||||
el.removeAttribute("data-lazy-l10n-id");
|
||||
});
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
- [New Tab Documentation](https://firefox-source-docs.mozilla.org/browser/components/newtab/docs/index.html)
|
||||
- You also need `meow@9.0.0` (that's the one I tested) because other versions might not work.
|
||||
- To bundle the new tab, execute the following:
|
||||
- To bundle the new tab, execute the following command:
|
||||
|
||||
```
|
||||
./mach npm run bundle --prefix=browser/components/newtab
|
||||
|
||||
@@ -131,6 +131,11 @@ var gZenMarketplaceManager = {
|
||||
return this._modsList;
|
||||
},
|
||||
|
||||
_triggerBuildUpdateWithoutRebuild() {
|
||||
this._doNotRebuildModsList = true;
|
||||
gZenMods.triggerModsUpdate();
|
||||
},
|
||||
|
||||
async removeMod(modId) {
|
||||
await gZenMods.removeMod(modId);
|
||||
|
||||
@@ -140,20 +145,13 @@ var gZenMarketplaceManager = {
|
||||
async disableMod(modId) {
|
||||
await gZenMods.disableMod(modId);
|
||||
|
||||
this._doNotRebuildModsList = true;
|
||||
gZenMods.triggerModsUpdate();
|
||||
this._triggerBuildUpdateWithoutRebuild();
|
||||
},
|
||||
|
||||
async enableMod(modId) {
|
||||
await gZenMods.enableMod(modId);
|
||||
|
||||
this._doNotRebuildModsList = true;
|
||||
gZenMods.triggerModsUpdate();
|
||||
},
|
||||
|
||||
_triggerBuildUpdateWithoutRebuild() {
|
||||
this._doNotRebuildModsList = true;
|
||||
gZenMods.triggerModsUpdate();
|
||||
this._triggerBuildUpdateWithoutRebuild();
|
||||
},
|
||||
|
||||
async _importThemes() {
|
||||
@@ -635,24 +633,9 @@ const kZenExtendedSidebar = 'zen.view.sidebar-expanded';
|
||||
const kZenSingleToolbar = 'zen.view.use-single-toolbar';
|
||||
|
||||
var gZenLooksAndFeel = {
|
||||
kZenColors: [
|
||||
'#aac7ff',
|
||||
'#74d7cb',
|
||||
'#a0d490',
|
||||
'#dec663',
|
||||
'#ffb787',
|
||||
'#dec1b1',
|
||||
'#ffb1c0',
|
||||
'#ddbfc3',
|
||||
'#f6b0ea',
|
||||
'#d4bbff',
|
||||
],
|
||||
|
||||
init() {
|
||||
if (this.__hasInitialized) return;
|
||||
this.__hasInitialized = true;
|
||||
this._initializeColorPicker(this._getInitialAccentColor());
|
||||
window.zenPageAccentColorChanged = this._handleAccentColorChange.bind(this);
|
||||
gZenMarketplaceManager.init();
|
||||
for (const pref of [kZenExtendedSidebar, kZenSingleToolbar]) {
|
||||
Services.prefs.addObserver(pref, this);
|
||||
@@ -745,37 +728,6 @@ var gZenLooksAndFeel = {
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
_initializeColorPicker(accentColor) {
|
||||
let elem = document.getElementById('zenLooksAndFeelColorOptions');
|
||||
elem.innerHTML = '';
|
||||
|
||||
for (let color of this.kZenColors) {
|
||||
let colorElemParen = document.createElement('div');
|
||||
let colorElem = document.createElement('div');
|
||||
colorElemParen.classList.add('zenLooksAndFeelColorOptionParen');
|
||||
colorElem.classList.add('zenLooksAndFeelColorOption');
|
||||
colorElem.style.setProperty('--zen-primary-color', color, 'important');
|
||||
if (accentColor === color) {
|
||||
colorElemParen.setAttribute('selected', 'true');
|
||||
}
|
||||
colorElemParen.addEventListener('click', () => {
|
||||
Services.prefs.setBoolPref('zen.theme.color-prefs.use-workspace-colors', false);
|
||||
Services.prefs.setStringPref('zen.theme.accent-color', color);
|
||||
});
|
||||
colorElemParen.appendChild(colorElem);
|
||||
elem.appendChild(colorElemParen);
|
||||
}
|
||||
// TODO: add custom color selection!
|
||||
},
|
||||
|
||||
_handleAccentColorChange(accentColor) {
|
||||
this._initializeColorPicker(accentColor);
|
||||
},
|
||||
|
||||
_getInitialAccentColor() {
|
||||
return Services.prefs.getStringPref('zen.theme.accent-color', this.kZenColors[0]);
|
||||
},
|
||||
};
|
||||
|
||||
var gZenWorkspacesSettings = {
|
||||
@@ -1185,11 +1137,6 @@ Preferences.addAll([
|
||||
type: 'bool',
|
||||
default: true,
|
||||
},
|
||||
{
|
||||
id: 'zen.theme.color-prefs.use-workspace-colors',
|
||||
type: 'bool',
|
||||
default: false,
|
||||
},
|
||||
{
|
||||
id: 'zen.view.compact.color-toolbar',
|
||||
type: 'bool',
|
||||
|
||||
@@ -39,35 +39,9 @@
|
||||
data-l10n-id="zen-vertical-tabs-newtab-top-button-up"
|
||||
preference="zen.view.show-newtab-button-top"/>
|
||||
</vbox>
|
||||
</groupbox>
|
||||
|
||||
<hbox id="zenLooksCategory"
|
||||
class="subcategory"
|
||||
hidden="true"
|
||||
data-category="paneZenLooks">
|
||||
<html:h1 data-l10n-id="pane-zen-looks-title"/>
|
||||
</hbox>
|
||||
|
||||
<groupbox id="zenLooksAndFeelGroup" data-category="paneZenLooks" hidden="true" class="highlighting-group">
|
||||
<label><html:h2 data-l10n-id="zen-look-and-feel-colors-header"/></label>
|
||||
<description class="description-deemphasized" data-l10n-id="zen-look-and-feel-colors-description" />
|
||||
|
||||
<hbox id="zenLooksAndFeelColorOptions" align="center">
|
||||
</hbox>
|
||||
|
||||
<html:div id="zen-theme-builder-wrapper"></html:div>
|
||||
|
||||
<box class="indent">
|
||||
<checkbox id="zenLooksAndFeelUseWorkspaceColors"
|
||||
data-l10n-id="zen-look-and-feel-use-workspace-colors"
|
||||
preference="zen.theme.color-prefs.use-workspace-colors"/>
|
||||
</box>
|
||||
|
||||
<hbox id="zenLooksAndFeelGradientPickerParent"></hbox>
|
||||
|
||||
<html:div data-l10n-id="preferences-web-appearance-footer">
|
||||
<html:a id="web-appearance-manage-themes-link" class="text-link" data-l10n-name="themes-link" href="about:addons" target="_blank" />
|
||||
</html:div>
|
||||
<html:div data-l10n-id="preferences-web-appearance-footer">
|
||||
<html:a id="web-appearance-manage-themes-link" class="text-link" data-l10n-name="themes-link" href="about:addons" target="_blank" />
|
||||
</html:div>
|
||||
</groupbox>
|
||||
|
||||
<hbox id="zenThemeCategory"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
diff --git a/browser/components/sessionstore/SessionStore.sys.mjs b/browser/components/sessionstore/SessionStore.sys.mjs
|
||||
index 8c6047e1ada5a22e57e1e665965237c9e22641d7..16b171c56081759e81d3efa6c0c7840fbd7902ff 100644
|
||||
index 8c6047e1ada5a22e57e1e665965237c9e22641d7..d3472a36fc99c488f0fd0fa8cb9c6927c24bdc6d 100644
|
||||
--- a/browser/components/sessionstore/SessionStore.sys.mjs
|
||||
+++ b/browser/components/sessionstore/SessionStore.sys.mjs
|
||||
@@ -2088,7 +2088,6 @@ var SessionStoreInternal = {
|
||||
@@ -51,6 +51,15 @@ index 8c6047e1ada5a22e57e1e665965237c9e22641d7..16b171c56081759e81d3efa6c0c7840f
|
||||
userContextId: state.userContextId,
|
||||
skipLoad: true,
|
||||
preferredRemoteType,
|
||||
@@ -5179,7 +5182,7 @@ var SessionStoreInternal = {
|
||||
|
||||
for (let i = tabbrowser.pinnedTabCount; i < tabbrowser.tabs.length; i++) {
|
||||
let tab = tabbrowser.tabs[i];
|
||||
- if (homePages.includes(tab.linkedBrowser.currentURI.spec)) {
|
||||
+ if (homePages.includes(tab.linkedBrowser.currentURI.spec) && !tab.hasAttribute("zen-empty-tab")) {
|
||||
removableTabs.push(tab);
|
||||
}
|
||||
}
|
||||
@@ -5239,7 +5242,7 @@ var SessionStoreInternal = {
|
||||
}
|
||||
|
||||
|
||||
@@ -1,12 +0,0 @@
|
||||
diff --git a/browser/components/sessionstore/content/aboutSessionRestore.xhtml b/browser/components/sessionstore/content/aboutSessionRestore.xhtml
|
||||
index 05538be5d95492903e44076dc43e195cbc76c10d..3c2ee6a9d44802657c9e0d5ef6c78e0b3920a9a5 100644
|
||||
--- a/browser/components/sessionstore/content/aboutSessionRestore.xhtml
|
||||
+++ b/browser/components/sessionstore/content/aboutSessionRestore.xhtml
|
||||
@@ -20,6 +20,7 @@
|
||||
<link rel="localization" href="browser/aboutSessionRestore.ftl"/>
|
||||
<link rel="localization" href="branding/brand.ftl"/>
|
||||
<script src="chrome://browser/content/aboutSessionRestore.js"/>
|
||||
+ <script src="chrome://browser/content/zenThemeModifier.js"></script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
@@ -1,5 +1,5 @@
|
||||
diff --git a/browser/components/tabbrowser/content/tabbrowser.js b/browser/components/tabbrowser/content/tabbrowser.js
|
||||
index d5aa64842a35c6697263c63fd3a0571b64b01344..37c84d1f61e76bfcf4fdead2299f748ac461f6a9 100644
|
||||
index d5aa64842a35c6697263c63fd3a0571b64b01344..e8f37acf7761adb7bd97cb06dc1df386ffc8ec0b 100644
|
||||
--- a/browser/components/tabbrowser/content/tabbrowser.js
|
||||
+++ b/browser/components/tabbrowser/content/tabbrowser.js
|
||||
@@ -413,11 +413,41 @@
|
||||
@@ -9,7 +9,7 @@ index d5aa64842a35c6697263c63fd3a0571b64b01344..37c84d1f61e76bfcf4fdead2299f748a
|
||||
+ get _numVisiblePinTabsWithoutCollapsed() {
|
||||
+ let i = 0;
|
||||
+ for (let item of this.tabContainer.ariaFocusableItems) {
|
||||
+ if (!!item?.classList?.contains("tab-group-label") && item.closest("tab-group").pinned) {
|
||||
+ if (this.isTabGroupLabel(item) && item.closest("tab-group")?.pinned) {
|
||||
+ i += 1;
|
||||
+ continue;
|
||||
+ }
|
||||
@@ -54,7 +54,13 @@ index d5aa64842a35c6697263c63fd3a0571b64b01344..37c84d1f61e76bfcf4fdead2299f748a
|
||||
tab.linkedPanel = uniqueId;
|
||||
this._selectedTab = tab;
|
||||
this._selectedBrowser = browser;
|
||||
@@ -834,11 +865,13 @@
|
||||
@@ -829,16 +860,18 @@
|
||||
}
|
||||
|
||||
pinTab(aTab) {
|
||||
- if (aTab.pinned || aTab == FirefoxViewHandler.tab) {
|
||||
+ if (aTab.pinned || aTab == FirefoxViewHandler.tab || aTab.hasAttribute("zen-empty-tab")) {
|
||||
return;
|
||||
}
|
||||
|
||||
this.showTab(aTab);
|
||||
@@ -295,7 +301,18 @@ index d5aa64842a35c6697263c63fd3a0571b64b01344..37c84d1f61e76bfcf4fdead2299f748a
|
||||
});
|
||||
}
|
||||
|
||||
@@ -3560,7 +3642,7 @@
|
||||
@@ -3517,7 +3599,9 @@
|
||||
let shouldUpdateForPinnedTabs = false;
|
||||
/** @type {Map<TabGroupStateData['id'], TabGroupWorkingData>} */
|
||||
let tabGroupWorkingData = new Map();
|
||||
-
|
||||
+ if (this._hasAlreadyInitializedZenSessionStore) {
|
||||
+ selectTab += 1; // SessionStoreInternal.restoreTabs expects a 1-based index.
|
||||
+ }
|
||||
for (const tabGroupData of tabGroupDataList) {
|
||||
tabGroupWorkingData.set(tabGroupData.id, {
|
||||
stateData: tabGroupData,
|
||||
@@ -3560,7 +3644,7 @@
|
||||
// Add a new tab if needed.
|
||||
if (!tab) {
|
||||
let createLazyBrowser =
|
||||
@@ -304,7 +321,7 @@ index d5aa64842a35c6697263c63fd3a0571b64b01344..37c84d1f61e76bfcf4fdead2299f748a
|
||||
|
||||
let url = "about:blank";
|
||||
if (tabData.entries?.length) {
|
||||
@@ -3598,7 +3680,8 @@
|
||||
@@ -3598,7 +3682,8 @@
|
||||
skipLoad: true,
|
||||
preferredRemoteType,
|
||||
});
|
||||
@@ -314,7 +331,7 @@ index d5aa64842a35c6697263c63fd3a0571b64b01344..37c84d1f61e76bfcf4fdead2299f748a
|
||||
if (select) {
|
||||
tabToSelect = tab;
|
||||
}
|
||||
@@ -3622,7 +3705,8 @@
|
||||
@@ -3622,7 +3707,8 @@
|
||||
// needs calling:
|
||||
shouldUpdateForPinnedTabs = true;
|
||||
}
|
||||
@@ -324,7 +341,7 @@ index d5aa64842a35c6697263c63fd3a0571b64b01344..37c84d1f61e76bfcf4fdead2299f748a
|
||||
let { groupId } = tabData;
|
||||
const tabGroup = tabGroupWorkingData.get(groupId);
|
||||
// if a tab refers to a tab group we don't know, skip any group
|
||||
@@ -3636,7 +3720,10 @@
|
||||
@@ -3636,7 +3722,10 @@
|
||||
tabGroup.stateData.id,
|
||||
tabGroup.stateData.color,
|
||||
tabGroup.stateData.collapsed,
|
||||
@@ -336,26 +353,31 @@ index d5aa64842a35c6697263c63fd3a0571b64b01344..37c84d1f61e76bfcf4fdead2299f748a
|
||||
);
|
||||
tabsFragment.appendChild(tabGroup.node);
|
||||
}
|
||||
@@ -3684,8 +3771,16 @@
|
||||
@@ -3684,9 +3773,23 @@
|
||||
// to remove the old selected tab.
|
||||
if (tabToSelect) {
|
||||
let leftoverTab = this.selectedTab;
|
||||
- this.selectedTab = tabToSelect;
|
||||
- this.removeTab(leftoverTab);
|
||||
+ gZenWorkspaces._tabToRemoveForEmpty = leftoverTab;
|
||||
+ if (Services.prefs.getBoolPref("zen.workspaces.continue-where-left-off")) {
|
||||
+ gZenWorkspaces._tabToSelect = selectTab - 1;
|
||||
+ }
|
||||
+ if (gZenWorkspaces._initialTab && !gZenVerticalTabsManager._canReplaceNewTab) {
|
||||
+ gZenWorkspaces._initialTab._shouldRemove = true;
|
||||
+ if (this._hasAlreadyInitializedZenSessionStore || !gZenWorkspaces.workspaceEnabled) {
|
||||
this.selectedTab = tabToSelect;
|
||||
this.removeTab(leftoverTab);
|
||||
+ } else {
|
||||
+ gZenWorkspaces._tabToRemoveForEmpty = leftoverTab;
|
||||
+ if (Services.prefs.getBoolPref("zen.workspaces.continue-where-left-off")) {
|
||||
+ gZenWorkspaces._tabToSelect = selectTab - 1;
|
||||
+ }
|
||||
+ if (gZenWorkspaces._initialTab && !gZenVerticalTabsManager._canReplaceNewTab) {
|
||||
+ gZenWorkspaces._initialTab._shouldRemove = true;
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+ else {
|
||||
+ gZenWorkspaces._tabToRemoveForEmpty = this.selectedTab;
|
||||
}
|
||||
+ this._hasAlreadyInitializedZenSessionStore = true;
|
||||
|
||||
if (tabs.length > 1 || !tabs[0].selected) {
|
||||
@@ -3881,7 +3976,7 @@
|
||||
this._updateTabsAfterInsert();
|
||||
@@ -3881,7 +3984,7 @@
|
||||
// Ensure we have an index if one was not provided.
|
||||
if (typeof elementIndex != "number" && typeof tabIndex != "number") {
|
||||
// Move the new tab after another tab if needed, to the end otherwise.
|
||||
@@ -364,7 +386,7 @@ index d5aa64842a35c6697263c63fd3a0571b64b01344..37c84d1f61e76bfcf4fdead2299f748a
|
||||
if (
|
||||
!bulkOrderedOpen &&
|
||||
((openerTab &&
|
||||
@@ -3904,7 +3999,7 @@
|
||||
@@ -3904,7 +4007,7 @@
|
||||
) {
|
||||
elementIndex = Infinity;
|
||||
} else if (previousTab.visible) {
|
||||
@@ -373,7 +395,7 @@ index d5aa64842a35c6697263c63fd3a0571b64b01344..37c84d1f61e76bfcf4fdead2299f748a
|
||||
} else if (previousTab == FirefoxViewHandler.tab) {
|
||||
elementIndex = 0;
|
||||
}
|
||||
@@ -3932,14 +4027,14 @@
|
||||
@@ -3932,14 +4035,14 @@
|
||||
}
|
||||
// Ensure index is within bounds.
|
||||
if (tab.pinned) {
|
||||
@@ -392,7 +414,7 @@ index d5aa64842a35c6697263c63fd3a0571b64b01344..37c84d1f61e76bfcf4fdead2299f748a
|
||||
|
||||
// Prevent a flash of unstyled content by setting up the tab content
|
||||
// and inherited attributes before appending it (see Bug 1592054):
|
||||
@@ -3947,7 +4042,7 @@
|
||||
@@ -3947,7 +4050,7 @@
|
||||
|
||||
this.tabContainer._invalidateCachedTabs();
|
||||
|
||||
@@ -401,7 +423,7 @@ index d5aa64842a35c6697263c63fd3a0571b64b01344..37c84d1f61e76bfcf4fdead2299f748a
|
||||
if (this.isTab(itemAfter) && itemAfter.group == tabGroup) {
|
||||
// Place at the front of, or between tabs in, the same tab group
|
||||
this.tabContainer.insertBefore(tab, itemAfter);
|
||||
@@ -3980,6 +4075,7 @@
|
||||
@@ -3980,6 +4083,7 @@
|
||||
if (pinned) {
|
||||
this._updateTabBarForPinnedTabs();
|
||||
}
|
||||
@@ -409,7 +431,7 @@ index d5aa64842a35c6697263c63fd3a0571b64b01344..37c84d1f61e76bfcf4fdead2299f748a
|
||||
|
||||
TabBarVisibility.update();
|
||||
}
|
||||
@@ -4268,6 +4364,9 @@
|
||||
@@ -4268,6 +4372,9 @@
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -419,7 +441,7 @@ index d5aa64842a35c6697263c63fd3a0571b64b01344..37c84d1f61e76bfcf4fdead2299f748a
|
||||
this.removeTabs(selectedTabs, { telemetrySource });
|
||||
}
|
||||
|
||||
@@ -4520,6 +4619,7 @@
|
||||
@@ -4520,6 +4627,7 @@
|
||||
telemetrySource,
|
||||
} = {}
|
||||
) {
|
||||
@@ -427,7 +449,7 @@ index d5aa64842a35c6697263c63fd3a0571b64b01344..37c84d1f61e76bfcf4fdead2299f748a
|
||||
// When 'closeWindowWithLastTab' pref is enabled, closing all tabs
|
||||
// can be considered equivalent to closing the window.
|
||||
if (
|
||||
@@ -4604,6 +4704,7 @@
|
||||
@@ -4604,6 +4712,7 @@
|
||||
if (lastToClose) {
|
||||
this.removeTab(lastToClose, aParams);
|
||||
}
|
||||
@@ -435,7 +457,7 @@ index d5aa64842a35c6697263c63fd3a0571b64b01344..37c84d1f61e76bfcf4fdead2299f748a
|
||||
} catch (e) {
|
||||
console.error(e);
|
||||
}
|
||||
@@ -4641,6 +4742,12 @@
|
||||
@@ -4641,6 +4750,12 @@
|
||||
aTab._closeTimeNoAnimTimerId = Glean.browserTabclose.timeNoAnim.start();
|
||||
}
|
||||
|
||||
@@ -448,7 +470,7 @@ index d5aa64842a35c6697263c63fd3a0571b64b01344..37c84d1f61e76bfcf4fdead2299f748a
|
||||
// Handle requests for synchronously removing an already
|
||||
// asynchronously closing tab.
|
||||
if (!animate && aTab.closing) {
|
||||
@@ -4655,7 +4762,9 @@
|
||||
@@ -4655,7 +4770,9 @@
|
||||
// frame created for it (for example, by updating the visually selected
|
||||
// state).
|
||||
let tabWidth = window.windowUtils.getBoundsWithoutFlushing(aTab).width;
|
||||
@@ -459,7 +481,7 @@ index d5aa64842a35c6697263c63fd3a0571b64b01344..37c84d1f61e76bfcf4fdead2299f748a
|
||||
if (
|
||||
!this._beginRemoveTab(aTab, {
|
||||
closeWindowFastpath: true,
|
||||
@@ -4821,7 +4930,7 @@
|
||||
@@ -4821,7 +4938,7 @@
|
||||
closeWindowWithLastTab != null
|
||||
? closeWindowWithLastTab
|
||||
: !window.toolbar.visible ||
|
||||
@@ -468,7 +490,7 @@ index d5aa64842a35c6697263c63fd3a0571b64b01344..37c84d1f61e76bfcf4fdead2299f748a
|
||||
|
||||
if (closeWindow) {
|
||||
// We've already called beforeunload on all the relevant tabs if we get here,
|
||||
@@ -4845,6 +4954,7 @@
|
||||
@@ -4845,6 +4962,7 @@
|
||||
|
||||
newTab = true;
|
||||
}
|
||||
@@ -476,7 +498,7 @@ index d5aa64842a35c6697263c63fd3a0571b64b01344..37c84d1f61e76bfcf4fdead2299f748a
|
||||
aTab._endRemoveArgs = [closeWindow, newTab];
|
||||
|
||||
// swapBrowsersAndCloseOther will take care of closing the window without animation.
|
||||
@@ -4885,9 +4995,7 @@
|
||||
@@ -4885,9 +5003,7 @@
|
||||
aTab._mouseleave();
|
||||
|
||||
if (newTab) {
|
||||
@@ -487,16 +509,15 @@ index d5aa64842a35c6697263c63fd3a0571b64b01344..37c84d1f61e76bfcf4fdead2299f748a
|
||||
} else {
|
||||
TabBarVisibility.update();
|
||||
}
|
||||
@@ -5016,6 +5124,8 @@
|
||||
@@ -5016,6 +5132,7 @@
|
||||
this.tabs[i]._tPos = i;
|
||||
}
|
||||
|
||||
+ gZenWorkspaces.updateTabsContainers();
|
||||
+
|
||||
if (!this._windowIsClosing) {
|
||||
if (wasPinned) {
|
||||
this.tabContainer._positionPinnedTabs();
|
||||
@@ -5230,6 +5340,7 @@
|
||||
@@ -5230,6 +5347,7 @@
|
||||
}
|
||||
|
||||
let excludeTabs = new Set(aExcludeTabs);
|
||||
@@ -504,7 +525,7 @@ index d5aa64842a35c6697263c63fd3a0571b64b01344..37c84d1f61e76bfcf4fdead2299f748a
|
||||
|
||||
// If this tab has a successor, it should be selectable, since
|
||||
// hiding or closing a tab removes that tab as a successor.
|
||||
@@ -5242,13 +5353,13 @@
|
||||
@@ -5242,13 +5360,13 @@
|
||||
!excludeTabs.has(aTab.owner) &&
|
||||
Services.prefs.getBoolPref("browser.tabs.selectOwnerOnClose")
|
||||
) {
|
||||
@@ -520,7 +541,7 @@ index d5aa64842a35c6697263c63fd3a0571b64b01344..37c84d1f61e76bfcf4fdead2299f748a
|
||||
);
|
||||
|
||||
let tab = this.tabContainer.findNextTab(aTab, {
|
||||
@@ -5264,7 +5375,7 @@
|
||||
@@ -5264,7 +5382,7 @@
|
||||
}
|
||||
|
||||
if (tab) {
|
||||
@@ -529,7 +550,7 @@ index d5aa64842a35c6697263c63fd3a0571b64b01344..37c84d1f61e76bfcf4fdead2299f748a
|
||||
}
|
||||
|
||||
// If no qualifying visible tab was found, see if there is a tab in
|
||||
@@ -5285,7 +5396,7 @@
|
||||
@@ -5285,7 +5403,7 @@
|
||||
});
|
||||
}
|
||||
|
||||
@@ -538,7 +559,7 @@ index d5aa64842a35c6697263c63fd3a0571b64b01344..37c84d1f61e76bfcf4fdead2299f748a
|
||||
}
|
||||
|
||||
_blurTab(aTab) {
|
||||
@@ -5686,10 +5797,10 @@
|
||||
@@ -5686,10 +5804,10 @@
|
||||
SessionStore.deleteCustomTabValue(aTab, "hiddenBy");
|
||||
}
|
||||
|
||||
@@ -551,7 +572,16 @@ index d5aa64842a35c6697263c63fd3a0571b64b01344..37c84d1f61e76bfcf4fdead2299f748a
|
||||
aTab.selected ||
|
||||
aTab.closing ||
|
||||
// Tabs that are sharing the screen, microphone or camera cannot be hidden.
|
||||
@@ -5986,7 +6097,7 @@
|
||||
@@ -5909,7 +6027,7 @@
|
||||
* `true` if element is a `<tab-group>`
|
||||
*/
|
||||
isTabGroup(element) {
|
||||
- return !!(element?.tagName == "tab-group");
|
||||
+ return !!(element?.tagName == "tab-group" || element?.tagName == "zen-folder");
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -5986,7 +6104,7 @@
|
||||
|
||||
// Don't allow mixing pinned and unpinned tabs.
|
||||
if (this.isTab(element) && element.pinned) {
|
||||
@@ -560,7 +590,7 @@ index d5aa64842a35c6697263c63fd3a0571b64b01344..37c84d1f61e76bfcf4fdead2299f748a
|
||||
} else {
|
||||
tabIndex = Math.max(tabIndex, this.pinnedTabCount);
|
||||
}
|
||||
@@ -6012,10 +6123,16 @@
|
||||
@@ -6012,10 +6130,16 @@
|
||||
this.#handleTabMove(
|
||||
element,
|
||||
() => {
|
||||
@@ -579,7 +609,7 @@ index d5aa64842a35c6697263c63fd3a0571b64b01344..37c84d1f61e76bfcf4fdead2299f748a
|
||||
if (neighbor && this.isTab(element) && tabIndex > element._tPos) {
|
||||
neighbor.after(element);
|
||||
} else {
|
||||
@@ -6084,17 +6201,29 @@
|
||||
@@ -6084,17 +6208,29 @@
|
||||
targetElement = targetElement.group;
|
||||
}
|
||||
}
|
||||
@@ -613,7 +643,7 @@ index d5aa64842a35c6697263c63fd3a0571b64b01344..37c84d1f61e76bfcf4fdead2299f748a
|
||||
if (element.pinned && this.tabContainer.verticalMode) {
|
||||
return this.tabContainer.verticalPinnedTabsContainer;
|
||||
}
|
||||
@@ -6154,7 +6283,7 @@
|
||||
@@ -6154,7 +6290,7 @@
|
||||
if (!this.isTab(aTab)) {
|
||||
throw new Error("Can only move a tab into a tab group");
|
||||
}
|
||||
@@ -622,7 +652,7 @@ index d5aa64842a35c6697263c63fd3a0571b64b01344..37c84d1f61e76bfcf4fdead2299f748a
|
||||
return;
|
||||
}
|
||||
if (aTab.group && aTab.group.id === aGroup.id) {
|
||||
@@ -6248,6 +6377,10 @@
|
||||
@@ -6248,6 +6384,10 @@
|
||||
|
||||
moveActionCallback();
|
||||
|
||||
@@ -633,7 +663,7 @@ index d5aa64842a35c6697263c63fd3a0571b64b01344..37c84d1f61e76bfcf4fdead2299f748a
|
||||
// Clear tabs cache after moving nodes because the order of tabs may have
|
||||
// changed.
|
||||
this.tabContainer._invalidateCachedTabs();
|
||||
@@ -7145,7 +7278,7 @@
|
||||
@@ -7145,7 +7285,7 @@
|
||||
// preventDefault(). It will still raise the window if appropriate.
|
||||
break;
|
||||
}
|
||||
@@ -642,7 +672,7 @@ index d5aa64842a35c6697263c63fd3a0571b64b01344..37c84d1f61e76bfcf4fdead2299f748a
|
||||
window.focus();
|
||||
aEvent.preventDefault();
|
||||
break;
|
||||
@@ -8044,6 +8177,7 @@
|
||||
@@ -8044,6 +8184,7 @@
|
||||
aWebProgress.isTopLevel
|
||||
) {
|
||||
this.mTab.setAttribute("busy", "true");
|
||||
@@ -650,7 +680,7 @@ index d5aa64842a35c6697263c63fd3a0571b64b01344..37c84d1f61e76bfcf4fdead2299f748a
|
||||
gBrowser._tabAttrModified(this.mTab, ["busy"]);
|
||||
this.mTab._notselectedsinceload = !this.mTab.selected;
|
||||
}
|
||||
@@ -9009,7 +9143,7 @@ var TabContextMenu = {
|
||||
@@ -9009,7 +9150,7 @@ var TabContextMenu = {
|
||||
);
|
||||
contextUnpinSelectedTabs.hidden =
|
||||
!this.contextTab.pinned || !this.multiselected;
|
||||
@@ -659,7 +689,7 @@ index d5aa64842a35c6697263c63fd3a0571b64b01344..37c84d1f61e76bfcf4fdead2299f748a
|
||||
// Move Tab items
|
||||
let contextMoveTabOptions = document.getElementById(
|
||||
"context_moveTabOptions"
|
||||
@@ -9278,6 +9412,7 @@ var TabContextMenu = {
|
||||
@@ -9278,6 +9419,7 @@ var TabContextMenu = {
|
||||
telemetrySource: gBrowser.TabMetrics.METRIC_SOURCE.TAB_STRIP,
|
||||
});
|
||||
} else {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
diff --git a/browser/components/tabbrowser/content/tabs.js b/browser/components/tabbrowser/content/tabs.js
|
||||
index 84d633471c89230b981d8a07babef4e0c76c0338..de8b1ecf7cb844f6cf3e66a41b6024c574dfc103 100644
|
||||
index 84d633471c89230b981d8a07babef4e0c76c0338..37ebb0a715629d372fb8054bcd8783eae31cc79a 100644
|
||||
--- a/browser/components/tabbrowser/content/tabs.js
|
||||
+++ b/browser/components/tabbrowser/content/tabs.js
|
||||
@@ -83,7 +83,7 @@
|
||||
@@ -100,23 +100,16 @@ index 84d633471c89230b981d8a07babef4e0c76c0338..de8b1ecf7cb844f6cf3e66a41b6024c5
|
||||
);
|
||||
let size = this.verticalMode ? "height" : "width";
|
||||
let screenAxis = this.verticalMode ? "screenY" : "screenX";
|
||||
@@ -1135,8 +1153,14 @@
|
||||
(lastMovingTabScreen + tabSize);
|
||||
|
||||
if (this.verticalMode) {
|
||||
+ if (oldTranslateY > 0 && translateOffsetY > tabHeight / 2) {
|
||||
+ newTranslateY += tabHeight;
|
||||
+ }
|
||||
+ if (oldTranslateY < 0 && -translateOffsetY > tabHeight / 2) {
|
||||
+ newTranslateY -= tabHeight;
|
||||
+ }
|
||||
newTranslateY = Math.min(
|
||||
- Math.max(oldTranslateY, firstBound),
|
||||
+ Math.max(newTranslateY, firstBound),
|
||||
lastBound
|
||||
);
|
||||
} else {
|
||||
@@ -1337,6 +1361,7 @@
|
||||
@@ -1168,7 +1186,7 @@
|
||||
(oldTranslateX && oldTranslateX != newTranslateX) ||
|
||||
(oldTranslateY && oldTranslateY != newTranslateY);
|
||||
} else if (this.verticalMode) {
|
||||
- shouldTranslate &&= oldTranslateY && oldTranslateY != newTranslateY;
|
||||
+ shouldTranslate &&= oldTranslateY && oldTranslateY != newTranslateY && movingTabs.length === 1;
|
||||
} else {
|
||||
shouldTranslate &&= oldTranslateX && oldTranslateX != newTranslateX;
|
||||
}
|
||||
@@ -1337,6 +1355,7 @@
|
||||
|
||||
let nextItem = this.ariaFocusableItems[newIndex];
|
||||
let tabGroup = isTab(nextItem) && nextItem.group;
|
||||
@@ -124,7 +117,7 @@ index 84d633471c89230b981d8a07babef4e0c76c0338..de8b1ecf7cb844f6cf3e66a41b6024c5
|
||||
gBrowser.loadTabs(urls, {
|
||||
inBackground,
|
||||
replace,
|
||||
@@ -1369,6 +1394,17 @@
|
||||
@@ -1369,6 +1388,17 @@
|
||||
|
||||
this.finishMoveTogetherSelectedTabs(draggedTab);
|
||||
this.finishAnimateTabMove();
|
||||
@@ -142,7 +135,7 @@ index 84d633471c89230b981d8a07babef4e0c76c0338..de8b1ecf7cb844f6cf3e66a41b6024c5
|
||||
this.#expandGroupOnDrop(draggedTab);
|
||||
|
||||
if (
|
||||
@@ -1597,7 +1633,7 @@
|
||||
@@ -1597,7 +1627,7 @@
|
||||
}
|
||||
|
||||
get newTabButton() {
|
||||
@@ -151,7 +144,7 @@ index 84d633471c89230b981d8a07babef4e0c76c0338..de8b1ecf7cb844f6cf3e66a41b6024c5
|
||||
}
|
||||
|
||||
get verticalMode() {
|
||||
@@ -1621,29 +1657,54 @@
|
||||
@@ -1621,29 +1651,54 @@
|
||||
if (this.#allTabs) {
|
||||
return this.#allTabs;
|
||||
}
|
||||
@@ -214,7 +207,7 @@ index 84d633471c89230b981d8a07babef4e0c76c0338..de8b1ecf7cb844f6cf3e66a41b6024c5
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1698,23 +1759,18 @@
|
||||
@@ -1698,23 +1753,18 @@
|
||||
}
|
||||
|
||||
let elementIndex = 0;
|
||||
@@ -242,7 +235,7 @@ index 84d633471c89230b981d8a07babef4e0c76c0338..de8b1ecf7cb844f6cf3e66a41b6024c5
|
||||
let visibleTabsInGroup = child.tabs.filter(tab => tab.visible);
|
||||
visibleTabsInGroup.forEach(tab => {
|
||||
tab.elementIndex = elementIndex++;
|
||||
@@ -1724,10 +1780,7 @@
|
||||
@@ -1724,10 +1774,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -254,7 +247,7 @@ index 84d633471c89230b981d8a07babef4e0c76c0338..de8b1ecf7cb844f6cf3e66a41b6024c5
|
||||
|
||||
return this.#focusableItems;
|
||||
}
|
||||
@@ -1735,6 +1788,7 @@
|
||||
@@ -1735,6 +1782,7 @@
|
||||
_invalidateCachedTabs() {
|
||||
this.#allTabs = null;
|
||||
this._invalidateCachedVisibleTabs();
|
||||
@@ -262,7 +255,7 @@ index 84d633471c89230b981d8a07babef4e0c76c0338..de8b1ecf7cb844f6cf3e66a41b6024c5
|
||||
}
|
||||
|
||||
_invalidateCachedVisibleTabs() {
|
||||
@@ -1749,8 +1803,8 @@
|
||||
@@ -1749,8 +1797,8 @@
|
||||
#isContainerVerticalPinnedGrid(tab) {
|
||||
return (
|
||||
this.verticalMode &&
|
||||
@@ -273,7 +266,7 @@ index 84d633471c89230b981d8a07babef4e0c76c0338..de8b1ecf7cb844f6cf3e66a41b6024c5
|
||||
!this.expandOnHover
|
||||
);
|
||||
}
|
||||
@@ -1766,7 +1820,7 @@
|
||||
@@ -1766,7 +1814,7 @@
|
||||
|
||||
if (node == null) {
|
||||
// We have a container for non-tab elements at the end of the scrollbox.
|
||||
@@ -282,7 +275,7 @@ index 84d633471c89230b981d8a07babef4e0c76c0338..de8b1ecf7cb844f6cf3e66a41b6024c5
|
||||
}
|
||||
|
||||
node.before(tab);
|
||||
@@ -1861,7 +1915,7 @@
|
||||
@@ -1861,7 +1909,7 @@
|
||||
// There are separate "new tab" buttons for horizontal tabs toolbar, vertical tabs and
|
||||
// for when the tab strip is overflowed (which is shared by vertical and horizontal tabs);
|
||||
// Attach the long click popup to all of them.
|
||||
@@ -291,7 +284,7 @@ index 84d633471c89230b981d8a07babef4e0c76c0338..de8b1ecf7cb844f6cf3e66a41b6024c5
|
||||
const newTab2 = this.newTabButton;
|
||||
const newTabVertical = document.getElementById(
|
||||
"vertical-tabs-newtab-button"
|
||||
@@ -1956,10 +2010,12 @@
|
||||
@@ -1956,10 +2004,12 @@
|
||||
|
||||
_handleTabSelect(aInstant) {
|
||||
let selectedTab = this.selectedItem;
|
||||
@@ -304,7 +297,7 @@ index 84d633471c89230b981d8a07babef4e0c76c0338..de8b1ecf7cb844f6cf3e66a41b6024c5
|
||||
selectedTab._notselectedsinceload = false;
|
||||
}
|
||||
|
||||
@@ -2132,6 +2188,7 @@
|
||||
@@ -2132,6 +2182,7 @@
|
||||
}
|
||||
|
||||
_positionPinnedTabs() {
|
||||
@@ -312,7 +305,7 @@ index 84d633471c89230b981d8a07babef4e0c76c0338..de8b1ecf7cb844f6cf3e66a41b6024c5
|
||||
let tabs = this.visibleTabs;
|
||||
let numPinned = gBrowser.pinnedTabCount;
|
||||
let absPositionHorizontalTabs =
|
||||
@@ -2206,7 +2263,7 @@
|
||||
@@ -2206,7 +2257,7 @@
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -321,7 +314,7 @@ index 84d633471c89230b981d8a07babef4e0c76c0338..de8b1ecf7cb844f6cf3e66a41b6024c5
|
||||
|
||||
let directionX = screenX > dragData.animLastScreenX;
|
||||
let directionY = screenY > dragData.animLastScreenY;
|
||||
@@ -2215,6 +2272,8 @@
|
||||
@@ -2215,6 +2266,8 @@
|
||||
|
||||
let { width: tabWidth, height: tabHeight } =
|
||||
draggedTab.getBoundingClientRect();
|
||||
@@ -330,7 +323,7 @@ index 84d633471c89230b981d8a07babef4e0c76c0338..de8b1ecf7cb844f6cf3e66a41b6024c5
|
||||
let shiftSizeX = tabWidth * movingTabs.length;
|
||||
let shiftSizeY = tabHeight;
|
||||
dragData.tabWidth = tabWidth;
|
||||
@@ -2244,7 +2303,7 @@
|
||||
@@ -2244,7 +2297,7 @@
|
||||
let translateX = screenX - dragData.screenX;
|
||||
let translateY = screenY - dragData.screenY;
|
||||
translateY +=
|
||||
@@ -339,7 +332,7 @@ index 84d633471c89230b981d8a07babef4e0c76c0338..de8b1ecf7cb844f6cf3e66a41b6024c5
|
||||
let firstBoundX = firstTabInRow.screenX - firstMovingTabScreenX;
|
||||
let firstBoundY = firstTabInRow.screenY - firstMovingTabScreenY;
|
||||
let lastBoundX =
|
||||
@@ -2389,12 +2448,16 @@
|
||||
@@ -2389,12 +2442,16 @@
|
||||
|
||||
this.#clearDragOverCreateGroupTimer();
|
||||
|
||||
@@ -360,7 +353,7 @@ index 84d633471c89230b981d8a07babef4e0c76c0338..de8b1ecf7cb844f6cf3e66a41b6024c5
|
||||
|
||||
if (this.#rtlMode) {
|
||||
tabs.reverse();
|
||||
@@ -2408,7 +2471,7 @@
|
||||
@@ -2408,7 +2465,7 @@
|
||||
let size = this.verticalMode ? "height" : "width";
|
||||
let translateAxis = this.verticalMode ? "translateY" : "translateX";
|
||||
let scrollDirection = this.verticalMode ? "scrollTop" : "scrollLeft";
|
||||
@@ -369,7 +362,7 @@ index 84d633471c89230b981d8a07babef4e0c76c0338..de8b1ecf7cb844f6cf3e66a41b6024c5
|
||||
let translateX = event.screenX - dragData.screenX;
|
||||
let translateY = event.screenY - dragData.screenY;
|
||||
|
||||
@@ -2422,12 +2485,21 @@
|
||||
@@ -2422,12 +2479,21 @@
|
||||
let lastTab = tabs.at(-1);
|
||||
let lastMovingTab = movingTabs.at(-1);
|
||||
let firstMovingTab = movingTabs[0];
|
||||
@@ -392,7 +385,7 @@ index 84d633471c89230b981d8a07babef4e0c76c0338..de8b1ecf7cb844f6cf3e66a41b6024c5
|
||||
translate +=
|
||||
this.arrowScrollbox.scrollbox[scrollDirection] - dragData.scrollPos;
|
||||
} else if (isPinned && this.verticalMode) {
|
||||
@@ -2446,6 +2518,9 @@
|
||||
@@ -2446,6 +2512,9 @@
|
||||
// Shift the `.tab-group-label-container` to shift the label element.
|
||||
item = item.parentElement;
|
||||
}
|
||||
@@ -402,7 +395,7 @@ index 84d633471c89230b981d8a07babef4e0c76c0338..de8b1ecf7cb844f6cf3e66a41b6024c5
|
||||
item.style.transform = `${translateAxis}(${translate}px)`;
|
||||
}
|
||||
|
||||
@@ -2583,6 +2658,9 @@
|
||||
@@ -2583,6 +2652,9 @@
|
||||
break;
|
||||
}
|
||||
let element = tabs[mid];
|
||||
@@ -412,7 +405,7 @@ index 84d633471c89230b981d8a07babef4e0c76c0338..de8b1ecf7cb844f6cf3e66a41b6024c5
|
||||
let elementForSize = isTabGroupLabel(element)
|
||||
? element.parentElement
|
||||
: element;
|
||||
@@ -2605,6 +2683,10 @@
|
||||
@@ -2605,6 +2677,10 @@
|
||||
if (!dropElement) {
|
||||
dropElement = this.ariaFocusableItems[oldDropElementIndex];
|
||||
}
|
||||
@@ -423,7 +416,7 @@ index 84d633471c89230b981d8a07babef4e0c76c0338..de8b1ecf7cb844f6cf3e66a41b6024c5
|
||||
let newDropElementIndex = dropElement
|
||||
? dropElement.elementIndex
|
||||
: oldDropElementIndex;
|
||||
@@ -2613,7 +2695,7 @@
|
||||
@@ -2613,7 +2689,7 @@
|
||||
let shouldCreateGroupOnDrop;
|
||||
let dropBefore;
|
||||
if (dropElement) {
|
||||
@@ -432,7 +425,7 @@ index 84d633471c89230b981d8a07babef4e0c76c0338..de8b1ecf7cb844f6cf3e66a41b6024c5
|
||||
? dropElement.parentElement
|
||||
: dropElement;
|
||||
|
||||
@@ -2675,12 +2757,12 @@
|
||||
@@ -2675,12 +2751,12 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -447,7 +440,7 @@ index 84d633471c89230b981d8a07babef4e0c76c0338..de8b1ecf7cb844f6cf3e66a41b6024c5
|
||||
dropElement != draggedTab &&
|
||||
isTab(dropElement) &&
|
||||
!dropElement?.group &&
|
||||
@@ -2720,7 +2802,7 @@
|
||||
@@ -2720,7 +2796,7 @@
|
||||
// Dropping right before the tab group.
|
||||
dropElement = dropElementGroup;
|
||||
colorCode = undefined;
|
||||
@@ -456,7 +449,7 @@ index 84d633471c89230b981d8a07babef4e0c76c0338..de8b1ecf7cb844f6cf3e66a41b6024c5
|
||||
// Dropping right after the collapsed tab group.
|
||||
dropElement = dropElementGroup;
|
||||
colorCode = undefined;
|
||||
@@ -2750,7 +2832,7 @@
|
||||
@@ -2750,7 +2826,7 @@
|
||||
// Shift background tabs to leave a gap where the dragged tab
|
||||
// would currently be dropped.
|
||||
for (let item of tabs) {
|
||||
@@ -465,7 +458,7 @@ index 84d633471c89230b981d8a07babef4e0c76c0338..de8b1ecf7cb844f6cf3e66a41b6024c5
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -2759,6 +2841,9 @@
|
||||
@@ -2759,6 +2835,9 @@
|
||||
if (isTabGroupLabel(item)) {
|
||||
// Shift the `.tab-group-label-container` to shift the label element.
|
||||
item = item.parentElement;
|
||||
@@ -475,7 +468,7 @@ index 84d633471c89230b981d8a07babef4e0c76c0338..de8b1ecf7cb844f6cf3e66a41b6024c5
|
||||
}
|
||||
item.style.transform = transform;
|
||||
}
|
||||
@@ -2811,8 +2896,9 @@
|
||||
@@ -2811,8 +2890,9 @@
|
||||
);
|
||||
}
|
||||
|
||||
@@ -487,7 +480,7 @@ index 84d633471c89230b981d8a07babef4e0c76c0338..de8b1ecf7cb844f6cf3e66a41b6024c5
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -2824,6 +2910,12 @@
|
||||
@@ -2824,6 +2904,12 @@
|
||||
item = item.parentElement;
|
||||
}
|
||||
item.style.transform = "";
|
||||
@@ -500,7 +493,7 @@ index 84d633471c89230b981d8a07babef4e0c76c0338..de8b1ecf7cb844f6cf3e66a41b6024c5
|
||||
item.removeAttribute("dragover-createGroup");
|
||||
}
|
||||
this.removeAttribute("movingtab-createGroup");
|
||||
@@ -2870,7 +2962,7 @@
|
||||
@@ -2870,7 +2956,7 @@
|
||||
let postTransitionCleanup = () => {
|
||||
movingTab._moveTogetherSelectedTabsData.animate = false;
|
||||
};
|
||||
@@ -509,7 +502,7 @@ index 84d633471c89230b981d8a07babef4e0c76c0338..de8b1ecf7cb844f6cf3e66a41b6024c5
|
||||
postTransitionCleanup();
|
||||
} else {
|
||||
let onTransitionEnd = transitionendEvent => {
|
||||
@@ -3043,7 +3135,7 @@
|
||||
@@ -3043,7 +3129,7 @@
|
||||
}
|
||||
|
||||
_notifyBackgroundTab(aTab) {
|
||||
@@ -518,7 +511,7 @@ index 84d633471c89230b981d8a07babef4e0c76c0338..de8b1ecf7cb844f6cf3e66a41b6024c5
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -3169,6 +3261,9 @@
|
||||
@@ -3169,6 +3255,9 @@
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
diff --git a/browser/components/urlbar/UrlbarInput.sys.mjs b/browser/components/urlbar/UrlbarInput.sys.mjs
|
||||
index 0c5145c3d31862bd2c6b5ed2faa88f02425ffde1..1cf86995514b2c00360f6ed681f0c640dac8ab56 100644
|
||||
index 0c5145c3d31862bd2c6b5ed2faa88f02425ffde1..370bd107be760893516360bd85553acb6533774b 100644
|
||||
--- a/browser/components/urlbar/UrlbarInput.sys.mjs
|
||||
+++ b/browser/components/urlbar/UrlbarInput.sys.mjs
|
||||
@@ -68,6 +68,13 @@ XPCOMUtils.defineLazyPreferenceGetter(
|
||||
@@ -187,7 +187,15 @@ index 0c5145c3d31862bd2c6b5ed2faa88f02425ffde1..1cf86995514b2c00360f6ed681f0c640
|
||||
|
||||
let controller =
|
||||
this.document.commandDispatcher.getControllerForCommand("cmd_paste");
|
||||
@@ -4136,6 +4204,11 @@ export class UrlbarInput {
|
||||
@@ -4025,6 +4093,7 @@ export class UrlbarInput {
|
||||
_setPlaceholder(name) {
|
||||
this.document.l10n.setAttributes(
|
||||
this.inputField,
|
||||
+ this.window.gZenVerticalTabsManager._hasSetSingleToolbar ? 'zen-singletoolbar-urlbar-placeholder-with-name' :
|
||||
name ? "urlbar-placeholder-with-name" : "urlbar-placeholder",
|
||||
name ? { name } : undefined
|
||||
);
|
||||
@@ -4136,6 +4205,11 @@ export class UrlbarInput {
|
||||
}
|
||||
|
||||
_on_click(event) {
|
||||
@@ -199,7 +207,7 @@ index 0c5145c3d31862bd2c6b5ed2faa88f02425ffde1..1cf86995514b2c00360f6ed681f0c640
|
||||
if (
|
||||
event.target == this.inputField ||
|
||||
event.target == this._inputContainer ||
|
||||
@@ -4207,7 +4280,7 @@ export class UrlbarInput {
|
||||
@@ -4207,7 +4281,7 @@ export class UrlbarInput {
|
||||
}
|
||||
}
|
||||
|
||||
@@ -208,7 +216,7 @@ index 0c5145c3d31862bd2c6b5ed2faa88f02425ffde1..1cf86995514b2c00360f6ed681f0c640
|
||||
this.view.autoOpen({ event });
|
||||
} else {
|
||||
if (this._untrimOnFocusAfterKeydown) {
|
||||
@@ -4247,9 +4320,16 @@ export class UrlbarInput {
|
||||
@@ -4247,9 +4321,16 @@ export class UrlbarInput {
|
||||
}
|
||||
|
||||
_on_mousedown(event) {
|
||||
@@ -226,7 +234,7 @@ index 0c5145c3d31862bd2c6b5ed2faa88f02425ffde1..1cf86995514b2c00360f6ed681f0c640
|
||||
|
||||
if (
|
||||
event.target != this.inputField &&
|
||||
@@ -4261,6 +4341,10 @@ export class UrlbarInput {
|
||||
@@ -4261,6 +4342,10 @@ export class UrlbarInput {
|
||||
|
||||
this.focusedViaMousedown = !this.focused;
|
||||
this._preventClickSelectsAll = this.focused;
|
||||
@@ -237,7 +245,7 @@ index 0c5145c3d31862bd2c6b5ed2faa88f02425ffde1..1cf86995514b2c00360f6ed681f0c640
|
||||
|
||||
// Keep the focus status, since the attribute may be changed
|
||||
// upon calling this.focus().
|
||||
@@ -4301,7 +4385,7 @@ export class UrlbarInput {
|
||||
@@ -4301,7 +4386,7 @@ export class UrlbarInput {
|
||||
}
|
||||
// Don't close the view when clicking on a tab; we may want to keep the
|
||||
// view open on tab switch, and the TabSelect event arrived earlier.
|
||||
|
||||
@@ -162,8 +162,7 @@ groupbox h2 {
|
||||
|
||||
/* Look and feel */
|
||||
|
||||
#webAppearanceSettings,
|
||||
#zen-theme-builder-wrapper + box {
|
||||
#webAppearanceSettings {
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
|
||||
@@ -203,31 +202,6 @@ groupbox h2 {
|
||||
list-style-image: url('chrome://browser/skin/customize.svg');
|
||||
}
|
||||
|
||||
#zenLooksAndFeelColorOptions {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fill, 108px);
|
||||
gap: 5px;
|
||||
margin: 10px 0 15px 0;
|
||||
}
|
||||
|
||||
.zenLooksAndFeelColorOptionParen {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 15px;
|
||||
border-radius: 10px;
|
||||
cursor: pointer;
|
||||
background: var(--in-content-box-info-background);
|
||||
width: fit-content;
|
||||
margin-top: 10px;
|
||||
border: 2px solid transparent;
|
||||
}
|
||||
|
||||
.zenLooksAndFeelColorOptionParen[selected='true'] {
|
||||
border-color: var(--zen-primary-color);
|
||||
}
|
||||
|
||||
#zenLooksAndFeelGroup > html|div:last-of-type {
|
||||
margin-top: 15px;
|
||||
}
|
||||
|
||||
@@ -1,7 +1,16 @@
|
||||
diff --git a/browser/themes/shared/tabbrowser/tabs.css b/browser/themes/shared/tabbrowser/tabs.css
|
||||
index 5b9ad123d819c6ef068acd427416957a1d0939fe..311caa27ee268c95215d459be02a93d20e129f8b 100644
|
||||
index 5b9ad123d819c6ef068acd427416957a1d0939fe..543d42dab2d84593f491a5652fcfe272ede59857 100644
|
||||
--- a/browser/themes/shared/tabbrowser/tabs.css
|
||||
+++ b/browser/themes/shared/tabbrowser/tabs.css
|
||||
@@ -19,7 +19,7 @@
|
||||
--tab-group-line-thickness: 2px;
|
||||
--tab-group-line-toolbar-border-distance: 1px;
|
||||
/* Collapsed tabs should be square, so set width to match the min height */
|
||||
- --tab-collapsed-background-width: var(--tab-min-height);
|
||||
+ --tab-collapsed-background-width: 48px;
|
||||
--tab-collapsed-width: calc(var(--tab-collapsed-background-width) + 2 * var(--tab-inner-inline-margin));
|
||||
--tab-inner-inline-margin: var(--space-medium);
|
||||
--tab-inline-padding: 8px;
|
||||
@@ -33,7 +33,7 @@
|
||||
--tab-block-margin: 4px;
|
||||
--tab-icon-end-margin: 5.5px;
|
||||
|
||||
@@ -43,6 +43,10 @@
|
||||
list-style-image: url('close.svg') !important;
|
||||
}
|
||||
|
||||
#PanelUI-zen-emojis-picker-none {
|
||||
list-style-image: url('trash.svg');
|
||||
}
|
||||
|
||||
.reset-icon {
|
||||
list-style-image: url('reload.svg') !important;
|
||||
}
|
||||
@@ -107,6 +111,7 @@
|
||||
|
||||
#PanelUI-menu-button,
|
||||
#appMenu-more-button2,
|
||||
.zen-workspaces-actions,
|
||||
#zen-workspace-actions-menu-icon {
|
||||
list-style-image: url('menu.svg') !important;
|
||||
}
|
||||
@@ -178,20 +183,15 @@
|
||||
|
||||
#zoom-in-button,
|
||||
#tabs-newtab-button,
|
||||
#zen-create-new-button,
|
||||
#new-tab-button,
|
||||
#appMenu-zoomEnlarge-button2,
|
||||
#PanelUI-zen-profiles-newProfile,
|
||||
#zen-sidebar-add-panel-button,
|
||||
#PanelUI-zen-workspaces-new image,
|
||||
#PanelUI-zen-gradient-generator-color-custom-add image {
|
||||
list-style-image: url('plus.svg') !important;
|
||||
}
|
||||
|
||||
#PanelUI-zen-workspaces-reorder-mode image {
|
||||
list-style-image: url('move-tab.svg') !important;
|
||||
rotate: 90deg;
|
||||
}
|
||||
|
||||
#cut-button {
|
||||
list-style-image: url('edit-cut.svg') !important;
|
||||
}
|
||||
@@ -765,3 +765,20 @@
|
||||
#zen-media-pip-button {
|
||||
list-style-image: url('chrome://global/skin/media/picture-in-picture-open.svg');
|
||||
}
|
||||
|
||||
#zenCreateNewPopup > menuitem image {
|
||||
-moz-context-properties: fill;
|
||||
fill: currentColor;
|
||||
}
|
||||
|
||||
#zen-create-new-button {
|
||||
border-radius: var(--tab-border-radius);
|
||||
|
||||
&:hover {
|
||||
background: var(--toolbarbutton-active-background);
|
||||
}
|
||||
|
||||
& image {
|
||||
background: transparent !important;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -126,6 +126,7 @@
|
||||
skin/classic/browser/zen-icons/tool-profiler.svg (../shared/zen-icons/lin/tool-profiler.svg)
|
||||
skin/classic/browser/zen-icons/tracking-protection.svg (../shared/zen-icons/lin/tracking-protection.svg)
|
||||
skin/classic/browser/zen-icons/translations.svg (../shared/zen-icons/lin/translations.svg)
|
||||
skin/classic/browser/zen-icons/trash.svg (../shared/zen-icons/lin/trash.svg)
|
||||
skin/classic/browser/zen-icons/unpin.svg (../shared/zen-icons/lin/unpin.svg)
|
||||
skin/classic/browser/zen-icons/video-blocked-fill.svg (../shared/zen-icons/lin/video-blocked-fill.svg)
|
||||
skin/classic/browser/zen-icons/video-fill.svg (../shared/zen-icons/lin/video-fill.svg)
|
||||
@@ -264,6 +265,7 @@
|
||||
skin/classic/browser/zen-icons/tool-profiler.svg (../shared/zen-icons/lin/tool-profiler.svg)
|
||||
skin/classic/browser/zen-icons/tracking-protection.svg (../shared/zen-icons/lin/tracking-protection.svg)
|
||||
skin/classic/browser/zen-icons/translations.svg (../shared/zen-icons/lin/translations.svg)
|
||||
skin/classic/browser/zen-icons/trash.svg (../shared/zen-icons/lin/trash.svg)
|
||||
skin/classic/browser/zen-icons/unpin.svg (../shared/zen-icons/lin/unpin.svg)
|
||||
skin/classic/browser/zen-icons/video-blocked-fill.svg (../shared/zen-icons/lin/video-blocked-fill.svg)
|
||||
skin/classic/browser/zen-icons/video-fill.svg (../shared/zen-icons/lin/video-fill.svg)
|
||||
@@ -402,6 +404,7 @@
|
||||
skin/classic/browser/zen-icons/tool-profiler.svg (../shared/zen-icons/lin/tool-profiler.svg)
|
||||
skin/classic/browser/zen-icons/tracking-protection.svg (../shared/zen-icons/lin/tracking-protection.svg)
|
||||
skin/classic/browser/zen-icons/translations.svg (../shared/zen-icons/lin/translations.svg)
|
||||
skin/classic/browser/zen-icons/trash.svg (../shared/zen-icons/lin/trash.svg)
|
||||
skin/classic/browser/zen-icons/unpin.svg (../shared/zen-icons/lin/unpin.svg)
|
||||
skin/classic/browser/zen-icons/video-blocked-fill.svg (../shared/zen-icons/lin/video-blocked-fill.svg)
|
||||
skin/classic/browser/zen-icons/video-fill.svg (../shared/zen-icons/lin/video-fill.svg)
|
||||
|
||||
1
src/browser/themes/shared/zen-icons/lin/trash.svg
Normal file
1
src/browser/themes/shared/zen-icons/lin/trash.svg
Normal file
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="18px" height="18px" viewBox="0 0 18 18"><path d="m13.474,7.25l-.374,7.105c-.056,1.062-.934,1.895-1.997,1.895h-4.205c-1.064,0-1.941-.833-1.997-1.895l-.374-7.105" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path><line x1="2.75" y1="4.75" x2="15.25" y2="4.75" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" data-color="color-2"></line><path d="m6.75,4.75v-2c0-.552.448-1,1-1h2.5c.552,0,1,.448,1,1v2" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" data-color="color-2"></path></svg>
|
||||
|
After Width: | Height: | Size: 748 B |
@@ -1,41 +0,0 @@
|
||||
diff --git a/dom/script/ScriptLoader.cpp b/dom/script/ScriptLoader.cpp
|
||||
index 51f63f998e47aa4b1dffc3cacdb0a698b33b4623..0387738ce1f29b5db4a5d03a3b2f5f3a91011125 100644
|
||||
--- a/dom/script/ScriptLoader.cpp
|
||||
+++ b/dom/script/ScriptLoader.cpp
|
||||
@@ -2679,6 +2679,36 @@ void ScriptLoader::CalculateBytecodeCacheFlag(ScriptLoadRequest* aRequest) {
|
||||
hasFetchCountMin = false;
|
||||
break;
|
||||
}
|
||||
+ case 1: {
|
||||
+ // 1!
|
||||
+ hasSourceLengthMin = true;
|
||||
+ hasFetchCountMin = true;
|
||||
+ sourceLengthMin = 1024;
|
||||
+ // If we were to optimize only for speed, without considering the impact
|
||||
+ // on memory, we should set this threshold to 2. (Bug 900784 comment 120)
|
||||
+ fetchCountMin = 1;
|
||||
+ break;
|
||||
+ }
|
||||
+ case 2: {
|
||||
+ // 2!
|
||||
+ hasSourceLengthMin = true;
|
||||
+ hasFetchCountMin = true;
|
||||
+ sourceLengthMin = 1024;
|
||||
+ // If we were to optimize only for speed, without considering the impact
|
||||
+ // on memory, we should set this threshold to 2. (Bug 900784 comment 120)
|
||||
+ fetchCountMin = 2;
|
||||
+ break;
|
||||
+ }
|
||||
+ case 3: {
|
||||
+ // 3!
|
||||
+ hasSourceLengthMin = true;
|
||||
+ hasFetchCountMin = true;
|
||||
+ sourceLengthMin = 1024;
|
||||
+ // If we were to optimize only for speed, without considering the impact
|
||||
+ // on memory, we should set this threshold to 2. (Bug 900784 comment 120)
|
||||
+ fetchCountMin = 3;
|
||||
+ break;
|
||||
+ }
|
||||
default:
|
||||
case 0: {
|
||||
hasSourceLengthMin = true;
|
||||
@@ -1,12 +0,0 @@
|
||||
diff --git a/toolkit/components/aboutconfig/content/aboutconfig.html b/toolkit/components/aboutconfig/content/aboutconfig.html
|
||||
index 853fd8f82bd10854c7fb17a73fd10eab0a9eef52..6f5e6606ebfa95a600037b995e5c743dd5aacba5 100644
|
||||
--- a/toolkit/components/aboutconfig/content/aboutconfig.html
|
||||
+++ b/toolkit/components/aboutconfig/content/aboutconfig.html
|
||||
@@ -34,6 +34,7 @@
|
||||
<link rel="icon" href="chrome://global/skin/icons/settings.svg" />
|
||||
<script src="chrome://global/content/aboutconfig/aboutconfig.js"></script>
|
||||
<title data-l10n-id="about-config-page-title"></title>
|
||||
+ <script src="chrome://browser/content/zenThemeModifier.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div
|
||||
@@ -1,12 +0,0 @@
|
||||
diff --git a/toolkit/components/aboutprocesses/content/aboutProcesses.html b/toolkit/components/aboutprocesses/content/aboutProcesses.html
|
||||
index 1d936bcca6a606f062b9438d78a1165445468471..cbefb51920e7b2ad11621ab2b36c69fa63967dfe 100644
|
||||
--- a/toolkit/components/aboutprocesses/content/aboutProcesses.html
|
||||
+++ b/toolkit/components/aboutprocesses/content/aboutProcesses.html
|
||||
@@ -20,6 +20,7 @@
|
||||
<link rel="localization" href="branding/brand.ftl" />
|
||||
<script src="chrome://global/content/aboutProcesses.js"></script>
|
||||
<link rel="stylesheet" href="chrome://global/content/aboutProcesses.css" />
|
||||
+ <script src="chrome://browser/content/zenThemeModifier.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<table id="process-table">
|
||||
@@ -1,12 +0,0 @@
|
||||
diff --git a/toolkit/components/printing/content/print.html b/toolkit/components/printing/content/print.html
|
||||
index 72ccab596c2f090d188f1d27278f68373e5b06be..541271c71a3df749826b7f5adbd55e76450bba8f 100644
|
||||
--- a/toolkit/components/printing/content/print.html
|
||||
+++ b/toolkit/components/printing/content/print.html
|
||||
@@ -21,6 +21,7 @@
|
||||
type="module"
|
||||
src="chrome://global/content/elements/moz-button-group.mjs"
|
||||
></script>
|
||||
+ <script src="chrome://browser/content/zenThemeModifier.js"></script>
|
||||
</head>
|
||||
|
||||
<body loading rendering>
|
||||
@@ -1,12 +0,0 @@
|
||||
diff --git a/toolkit/components/prompts/content/commonDialog.xhtml b/toolkit/components/prompts/content/commonDialog.xhtml
|
||||
index c47761ec958a11870e55294fe9c6de8f3afbda2f..5e0313864c67a774874c215fd043b9b8af39d8cb 100644
|
||||
--- a/toolkit/components/prompts/content/commonDialog.xhtml
|
||||
+++ b/toolkit/components/prompts/content/commonDialog.xhtml
|
||||
@@ -30,6 +30,7 @@
|
||||
|
||||
<html:link rel="localization" href="branding/brand.ftl" />
|
||||
<html:link rel="localization" href="toolkit/global/commonDialog.ftl" />
|
||||
+ <script src="chrome://browser/content/zenThemeModifier.js"></script>
|
||||
</linkset>
|
||||
<script src="chrome://global/content/adjustableTitle.js" />
|
||||
<script src="chrome://global/content/commonDialog.js" />
|
||||
@@ -1,12 +0,0 @@
|
||||
diff --git a/toolkit/content/aboutAbout.html b/toolkit/content/aboutAbout.html
|
||||
index 74702381dd1bed2d4bb47c464ae0ca309c10e45b..f1e6b34bbf29d787bd62d625707dead024cf6011 100644
|
||||
--- a/toolkit/content/aboutAbout.html
|
||||
+++ b/toolkit/content/aboutAbout.html
|
||||
@@ -24,6 +24,7 @@
|
||||
href="chrome://branding/content/icon32.png"
|
||||
/>
|
||||
<script src="chrome://global/content/aboutAbout.js"></script>
|
||||
+ <script src="chrome://browser/content/zenThemeModifier.js"></script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
@@ -1,12 +0,0 @@
|
||||
diff --git a/toolkit/content/aboutProfiles.xhtml b/toolkit/content/aboutProfiles.xhtml
|
||||
index 3ce9e580627d757e9bb3fa09601e6336e2376c73..cd69facbf05c525de061c496e08dc12096692e86 100644
|
||||
--- a/toolkit/content/aboutProfiles.xhtml
|
||||
+++ b/toolkit/content/aboutProfiles.xhtml
|
||||
@@ -27,6 +27,7 @@
|
||||
<script src="chrome://global/content/aboutProfiles.js" />
|
||||
<link rel="localization" href="branding/brand.ftl" />
|
||||
<link rel="localization" href="toolkit/about/aboutProfiles.ftl" />
|
||||
+ <script src="chrome://browser/content/zenThemeModifier.js"></script>
|
||||
</head>
|
||||
<body id="body" class="wide-container">
|
||||
<h1 data-l10n-id="profiles-title"></h1>
|
||||
@@ -1,12 +0,0 @@
|
||||
diff --git a/toolkit/content/aboutSupport.xhtml b/toolkit/content/aboutSupport.xhtml
|
||||
index 7f57218f3573488445ea363e0c4532b292d53167..511f578b4ae38a496ca936adf2fef1f587249f47 100644
|
||||
--- a/toolkit/content/aboutSupport.xhtml
|
||||
+++ b/toolkit/content/aboutSupport.xhtml
|
||||
@@ -10,6 +10,7 @@
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
+ <script src="chrome://browser/content/zenThemeModifier.js"></script>
|
||||
<meta http-equiv="Content-Security-Policy" content="default-src chrome:; object-src 'none'" />
|
||||
<meta name="color-scheme" content="light dark" />
|
||||
<title data-l10n-id="page-title"/>
|
||||
@@ -1,12 +0,0 @@
|
||||
diff --git a/toolkit/mozapps/extensions/content/aboutaddons.html b/toolkit/mozapps/extensions/content/aboutaddons.html
|
||||
index 77702576f03cc8db7ec85bd871e6366fef935d54..edd5f27303802091c84572a7a2d3933c03cf09d9 100644
|
||||
--- a/toolkit/mozapps/extensions/content/aboutaddons.html
|
||||
+++ b/toolkit/mozapps/extensions/content/aboutaddons.html
|
||||
@@ -86,6 +86,7 @@
|
||||
type="module"
|
||||
src="chrome://global/content/elements/moz-five-star.mjs"
|
||||
></script>
|
||||
+ <script src="chrome://browser/content/zenThemeModifier.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<drag-drop-addon-installer></drag-drop-addon-installer>
|
||||
@@ -6,7 +6,7 @@ export var ZenCustomizableUI = new (class {
|
||||
constructor() {}
|
||||
|
||||
TYPE_TOOLBAR = 'toolbar';
|
||||
defaultSidebarIcons = ['preferences-button', 'zen-workspaces-button', 'downloads-button'];
|
||||
defaultSidebarIcons = ['downloads-button', 'zen-workspaces-button', 'zen-create-new-button'];
|
||||
|
||||
startup(CustomizableUIInternal) {
|
||||
CustomizableUIInternal.registerArea(
|
||||
@@ -20,7 +20,7 @@ export var ZenCustomizableUI = new (class {
|
||||
true
|
||||
);
|
||||
CustomizableUIInternal.registerArea(
|
||||
'zen-sidebar-bottom-buttons',
|
||||
'zen-sidebar-foot-buttons',
|
||||
{
|
||||
type: this.TYPE_TOOLBAR,
|
||||
defaultPlacements: this.defaultSidebarIcons,
|
||||
@@ -100,9 +100,39 @@ export var ZenCustomizableUI = new (class {
|
||||
elem.setAttribute('removable', 'true');
|
||||
}
|
||||
|
||||
this._initCreateNewButton(window);
|
||||
this._moveWindowButtons(window);
|
||||
}
|
||||
|
||||
_initCreateNewButton(window) {
|
||||
const button = window.document.getElementById('zen-create-new-button');
|
||||
button.addEventListener('command', () => {
|
||||
if (button.hasAttribute('open')) {
|
||||
return;
|
||||
}
|
||||
const image = button.querySelector('image');
|
||||
const popup = window.document.getElementById('zenCreateNewPopup');
|
||||
button.setAttribute('open', 'true');
|
||||
const handlePopupHidden = () => {
|
||||
window.setTimeout(() => {
|
||||
button.removeAttribute('open');
|
||||
}, 500);
|
||||
window.gZenUIManager.motion.animate(
|
||||
image,
|
||||
{ transform: ['rotate(45deg)', 'rotate(0deg)'] },
|
||||
{ duration: 0.2 }
|
||||
);
|
||||
};
|
||||
popup.addEventListener('popuphidden', handlePopupHidden, { once: true });
|
||||
popup.openPopup(button, 'after_start');
|
||||
window.gZenUIManager.motion.animate(
|
||||
image,
|
||||
{ transform: ['rotate(0deg)', 'rotate(45deg)'] },
|
||||
{ duration: 0.2 }
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
_moveWindowButtons(window) {
|
||||
const windowControls = window.document.getElementsByClassName('titlebar-buttonbox-container');
|
||||
const toolboxIcons = window.document.getElementById(
|
||||
@@ -123,7 +153,7 @@ export var ZenCustomizableUI = new (class {
|
||||
}
|
||||
|
||||
_hideToolbarButtons(window) {
|
||||
const wrapper = window.document.getElementById('zen-sidebar-bottom-buttons');
|
||||
const wrapper = window.document.getElementById('zen-sidebar-foot-buttons');
|
||||
const elementsToHide = ['new-tab-button'];
|
||||
for (let id of elementsToHide) {
|
||||
const elem = window.document.getElementById(id);
|
||||
@@ -142,7 +172,7 @@ export var ZenCustomizableUI = new (class {
|
||||
window.document.getElementById('zen-sidebar-top-buttons')
|
||||
);
|
||||
window.CustomizableUI.registerToolbarNode(
|
||||
window.document.getElementById('zen-sidebar-bottom-buttons')
|
||||
window.document.getElementById('zen-sidebar-foot-buttons')
|
||||
);
|
||||
}
|
||||
})();
|
||||
|
||||
File diff suppressed because one or more lines are too long
9
src/zen/common/ZenPreloadedScripts.js
Normal file
9
src/zen/common/ZenPreloadedScripts.js
Normal file
@@ -0,0 +1,9 @@
|
||||
// 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/.
|
||||
|
||||
// prettier-ignore
|
||||
// eslint-disable-next-line no-lone-blocks
|
||||
{
|
||||
Services.scriptloader.loadSubScript("chrome://browser/content/ZenStartup.mjs", this);
|
||||
}
|
||||
@@ -36,7 +36,6 @@
|
||||
}
|
||||
|
||||
async #waitAndCleanup() {
|
||||
await SessionStore.promiseAllWindowsRestored;
|
||||
await SessionStore.promiseInitialized;
|
||||
this.#cleanup();
|
||||
}
|
||||
|
||||
@@ -3,14 +3,13 @@
|
||||
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
{
|
||||
var ZenStartup = {
|
||||
_watermarkIgnoreElements: ['zen-browser-background', 'zen-toast-container'],
|
||||
_watermarkIgnoreElements: ['zen-toast-container'],
|
||||
|
||||
init() {
|
||||
async init() {
|
||||
this.openWatermark();
|
||||
this._initBrowserBackground();
|
||||
await this._initBrowserBackground();
|
||||
this._changeSidebarLocation();
|
||||
this._zenInitBrowserLayout();
|
||||
this._initSearchBar();
|
||||
},
|
||||
|
||||
_initBrowserBackground() {
|
||||
@@ -22,11 +21,10 @@
|
||||
document.getElementById('browser').prepend(background);
|
||||
},
|
||||
|
||||
_zenInitBrowserLayout() {
|
||||
async _zenInitBrowserLayout() {
|
||||
if (this.__hasInitBrowserLayout) return;
|
||||
this.__hasInitBrowserLayout = true;
|
||||
try {
|
||||
console.info('ZenThemeModifier: init browser layout');
|
||||
const kNavbarItems = ['nav-bar', 'PersonalToolbar'];
|
||||
const kNewContainerId = 'zen-appcontent-navbar-container';
|
||||
let newContainer = document.getElementById(kNewContainerId);
|
||||
@@ -43,10 +41,7 @@
|
||||
document.getElementById('zen-appcontent-wrapper').prepend(deckTemplate);
|
||||
}
|
||||
|
||||
this._hideUnusedElements();
|
||||
|
||||
gZenWorkspaces.init();
|
||||
gZenVerticalTabsManager.init();
|
||||
gZenUIManager.init();
|
||||
|
||||
this._checkForWelcomePage();
|
||||
@@ -78,6 +73,8 @@
|
||||
gZenWorkspaces.promiseInitialized.then(async () => {
|
||||
await delayedStartupPromise;
|
||||
await SessionStore.promiseAllWindowsRestored;
|
||||
delete gZenUIManager.promiseInitialized;
|
||||
this._initSearchBar();
|
||||
setTimeout(() => {
|
||||
gZenCompactModeManager.init();
|
||||
setTimeout(() => {
|
||||
@@ -149,23 +146,9 @@
|
||||
}
|
||||
},
|
||||
|
||||
_hideUnusedElements() {
|
||||
const kElements = ['firefox-view-button'];
|
||||
for (let id of kElements) {
|
||||
const elem = document.getElementById(id);
|
||||
if (elem) {
|
||||
elem.setAttribute('hidden', 'true');
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
_initSearchBar() {
|
||||
// Only focus the url bar
|
||||
gURLBar.focus();
|
||||
|
||||
gURLBar._initCopyCutController();
|
||||
gURLBar._initPasteAndGo();
|
||||
gURLBar._initStripOnShare();
|
||||
},
|
||||
|
||||
_checkForWelcomePage() {
|
||||
@@ -179,5 +162,11 @@
|
||||
},
|
||||
};
|
||||
|
||||
ZenStartup.init();
|
||||
window.addEventListener(
|
||||
'MozBeforeInitialXULLayout',
|
||||
() => {
|
||||
ZenStartup.init();
|
||||
},
|
||||
{ once: true }
|
||||
);
|
||||
}
|
||||
|
||||
@@ -34,8 +34,6 @@ var gZenUIManager = {
|
||||
true
|
||||
);
|
||||
|
||||
gURLBar._zenTrimURL = this.urlbarTrim.bind(this);
|
||||
|
||||
document.addEventListener('mousedown', this.handleMouseDown.bind(this), true);
|
||||
|
||||
ChromeUtils.defineLazyGetter(this, 'motion', () => {
|
||||
@@ -48,6 +46,8 @@ var gZenUIManager = {
|
||||
return document.getElementById('zen-toast-container');
|
||||
});
|
||||
|
||||
gURLBar._zenTrimURL = this.urlbarTrim.bind(this);
|
||||
|
||||
new ResizeObserver(this.updateTabsToolbar.bind(this)).observe(
|
||||
document.getElementById('TabsToolbar')
|
||||
);
|
||||
@@ -59,7 +59,7 @@ var gZenUIManager = {
|
||||
)
|
||||
).observe(gNavToolbox);
|
||||
|
||||
SessionStore.promiseAllWindowsRestored.then(() => {
|
||||
gZenWorkspaces.promiseInitialized.finally(() => {
|
||||
this._hasLoadedDOM = true;
|
||||
this.updateTabsToolbar();
|
||||
});
|
||||
@@ -67,6 +67,7 @@ var gZenUIManager = {
|
||||
window.addEventListener('TabClose', this.onTabClose.bind(this));
|
||||
|
||||
gZenMediaController.init();
|
||||
gZenVerticalTabsManager.init();
|
||||
},
|
||||
|
||||
handleMouseDown(event) {
|
||||
@@ -82,6 +83,7 @@ var gZenUIManager = {
|
||||
'--zen-urlbar-top',
|
||||
`${window.innerHeight / 2 - Math.max(kUrlbarHeight, gURLBar.textbox.getBoundingClientRect().height) / 2}px`
|
||||
);
|
||||
gURLBar.textbox.style.setProperty('--zen-urlbar-width', `${window.innerWidth / 3}px`);
|
||||
gZenVerticalTabsManager.actualWindowButtons.removeAttribute('zen-has-hover');
|
||||
gZenVerticalTabsManager.recalculateURLBarHeight();
|
||||
if (!this._preventToolbarRebuild) {
|
||||
@@ -155,7 +157,9 @@ var gZenUIManager = {
|
||||
if (
|
||||
!el.contains(showEvent.explicitOriginalTarget) ||
|
||||
(showEvent.explicitOriginalTarget instanceof Element &&
|
||||
showEvent.explicitOriginalTarget?.closest('panel'))
|
||||
showEvent.explicitOriginalTarget?.closest('panel')) ||
|
||||
// See bug #7590: Ignore menupopup elements opening
|
||||
showEvent.explicitOriginalTarget.tagName === 'menupopup'
|
||||
) {
|
||||
continue;
|
||||
}
|
||||
@@ -451,7 +455,7 @@ var gZenUIManager = {
|
||||
const wrapper = document.createXULElement('hbox');
|
||||
const element = document.createXULElement('vbox');
|
||||
const label = document.createXULElement('label');
|
||||
document.l10n.setAttributes(label, messageId, options);
|
||||
document.l10n.setAttributes(label, messageId, options.l10nArgs);
|
||||
element.appendChild(label);
|
||||
if (options.descriptionId) {
|
||||
const description = document.createXULElement('label');
|
||||
@@ -597,7 +601,7 @@ var gZenVerticalTabsManager = {
|
||||
},
|
||||
|
||||
animateTab(aTab) {
|
||||
if (!gZenUIManager.motion || !aTab || !gZenUIManager._hasLoadedDOM) {
|
||||
if (!gZenUIManager.motion || !aTab || !gZenUIManager._hasLoadedDOM || !aTab.isConnected) {
|
||||
return;
|
||||
}
|
||||
// get next visible tab
|
||||
@@ -622,7 +626,11 @@ var gZenVerticalTabsManager = {
|
||||
easing: 'ease-out',
|
||||
}
|
||||
)
|
||||
.then(() => {
|
||||
.then(() => {})
|
||||
.catch((err) => {
|
||||
console.error(err);
|
||||
})
|
||||
.finally(() => {
|
||||
aTab.style.removeProperty('margin-bottom');
|
||||
aTab.style.removeProperty('transform');
|
||||
aTab.style.removeProperty('opacity');
|
||||
@@ -638,7 +646,11 @@ var gZenVerticalTabsManager = {
|
||||
easing: 'ease-out',
|
||||
}
|
||||
)
|
||||
.then(() => {
|
||||
.then(() => {})
|
||||
.catch((err) => {
|
||||
console.error(err);
|
||||
})
|
||||
.finally(() => {
|
||||
aTab.querySelector('.tab-stack').style.removeProperty('filter');
|
||||
});
|
||||
} catch (e) {
|
||||
@@ -745,7 +757,9 @@ var gZenVerticalTabsManager = {
|
||||
document.getElementById('urlbar').style.setProperty('--urlbar-height', '32px');
|
||||
} else if (gURLBar.getAttribute('breakout-extend') !== 'true') {
|
||||
try {
|
||||
gURLBar.zenUpdateLayoutBreakout();
|
||||
gURLBar.zenUpdateLayoutBreakout().then(() => {
|
||||
gURLBar.valueFormatter._formatURL();
|
||||
});
|
||||
} catch (e) {
|
||||
console.warn(e);
|
||||
}
|
||||
@@ -955,12 +969,23 @@ var gZenVerticalTabsManager = {
|
||||
gZenCompactModeManager.getAndApplySidebarWidth();
|
||||
}
|
||||
gZenUIManager.updateTabsToolbar();
|
||||
this.rebuildURLBarMenus();
|
||||
} catch (e) {
|
||||
console.error(e);
|
||||
}
|
||||
this._isUpdating = false;
|
||||
},
|
||||
|
||||
rebuildURLBarMenus() {
|
||||
if (document.getElementById('paste-and-go')) {
|
||||
return;
|
||||
}
|
||||
gURLBar._initCopyCutController();
|
||||
gURLBar._initPasteAndGo();
|
||||
gURLBar._initStripOnShare();
|
||||
gURLBar._updatePlaceholderFromDefaultEngine();
|
||||
},
|
||||
|
||||
rebuildAreas() {
|
||||
CustomizableUI.zenInternalCU._rebuildRegisteredAreas(/* zenDontRebuildCollapsed */ true);
|
||||
},
|
||||
@@ -1068,7 +1093,9 @@ var gZenVerticalTabsManager = {
|
||||
!gZenVerticalTabsManager._prefsSidebarExpanded
|
||||
)
|
||||
return;
|
||||
this._tabEdited = event.target.closest('.tabbrowser-tab');
|
||||
this._tabEdited =
|
||||
event.target.closest('.tabbrowser-tab') ||
|
||||
event.target.closest('.zen-current-workspace-indicator-name');
|
||||
if (
|
||||
!this._tabEdited ||
|
||||
((!this._tabEdited.pinned || this._tabEdited.hasAttribute('zen-essential')) && isTab)
|
||||
@@ -1076,7 +1103,7 @@ var gZenVerticalTabsManager = {
|
||||
this._tabEdited = null;
|
||||
return;
|
||||
}
|
||||
event.stopPropagation();
|
||||
event.stopPropagation?.();
|
||||
document.documentElement.setAttribute('zen-renaming-tab', 'true');
|
||||
const label = isTab ? this._tabEdited.querySelector('.tab-label-container') : this._tabEdited;
|
||||
label.classList.add('tab-label-container-editing');
|
||||
@@ -1087,15 +1114,17 @@ var gZenVerticalTabsManager = {
|
||||
`);
|
||||
label.after(container);
|
||||
}
|
||||
const containerHtml = isTab
|
||||
? this._tabEdited.querySelector('.tab-editor-container')
|
||||
: this._tabEdited.parentNode;
|
||||
const input = document.createElement('input');
|
||||
input.id = 'tab-label-input';
|
||||
input.value = isTab ? this._tabEdited.label : this._tabEdited.textContent;
|
||||
input.addEventListener('keydown', this.renameTabKeydown.bind(this));
|
||||
|
||||
containerHtml.appendChild(input);
|
||||
if (isTab) {
|
||||
const containerHtml = this._tabEdited.querySelector('.tab-editor-container');
|
||||
containerHtml.appendChild(input);
|
||||
} else {
|
||||
this._tabEdited.after(input);
|
||||
}
|
||||
input.focus();
|
||||
input.select();
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ ChromeUtils.defineESModuleGetters(lazy, {
|
||||
|
||||
class ZenUIMigration {
|
||||
PREF_NAME = 'zen.migration.version';
|
||||
MIGRATION_VERSION = 4;
|
||||
MIGRATION_VERSION = 5;
|
||||
|
||||
init(isNewProfile, win) {
|
||||
if (!isNewProfile) {
|
||||
|
||||
144
src/zen/common/emojis/ZenEmojiPicker.mjs
Normal file
144
src/zen/common/emojis/ZenEmojiPicker.mjs
Normal file
@@ -0,0 +1,144 @@
|
||||
{
|
||||
class ZenEmojiPicker extends ZenDOMOperatedFeature {
|
||||
#panel;
|
||||
|
||||
#anchor;
|
||||
|
||||
#currentPromise = null;
|
||||
#currentPromiseResolve = null;
|
||||
#currentPromiseReject = null;
|
||||
|
||||
init() {
|
||||
this.#panel = document.getElementById('PanelUI-zen-emojis-picker');
|
||||
this.#panel.addEventListener('popupshowing', this);
|
||||
this.#panel.addEventListener('popuphidden', this);
|
||||
document.getElementById('PanelUI-zen-emojis-picker-none').addEventListener('command', this);
|
||||
this.searchInput.addEventListener('input', this);
|
||||
}
|
||||
|
||||
handleEvent(event) {
|
||||
switch (event.type) {
|
||||
case 'popupshowing':
|
||||
this.#onPopupShowing(event);
|
||||
break;
|
||||
case 'popuphidden':
|
||||
this.#onPopupHidden(event);
|
||||
break;
|
||||
case 'command':
|
||||
if (event.target.id === 'PanelUI-zen-emojis-picker-none') {
|
||||
this.#selectEmoji(null);
|
||||
}
|
||||
break;
|
||||
case 'input':
|
||||
this.#onSearchInput(event);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
get #emojis() {
|
||||
if (this._emojis) {
|
||||
return this._emojis;
|
||||
}
|
||||
const lazy = {};
|
||||
Services.scriptloader.loadSubScript(
|
||||
'chrome://browser/content/zen-components/ZenEmojisData.min.mjs',
|
||||
lazy
|
||||
);
|
||||
this._emojis = lazy.ZenEmojisData;
|
||||
return this._emojis;
|
||||
}
|
||||
|
||||
get emojiList() {
|
||||
return document.getElementById('PanelUI-zen-emojis-picker-list');
|
||||
}
|
||||
|
||||
get searchInput() {
|
||||
return document.getElementById('PanelUI-zen-emojis-picker-search');
|
||||
}
|
||||
|
||||
#clearEmojis() {
|
||||
delete this._emojis;
|
||||
}
|
||||
|
||||
#onSearchInput(event) {
|
||||
const input = event.target;
|
||||
const value = input.value.trim().toLowerCase();
|
||||
// search for emojis.tags and order by emojis.order
|
||||
const filteredEmojis = this.#emojis
|
||||
.filter((emoji) => {
|
||||
return emoji.tags.some((tag) => tag.toLowerCase().includes(value));
|
||||
})
|
||||
.sort((a, b) => a.order - b.order);
|
||||
for (const button of this.emojiList.children) {
|
||||
const buttonEmoji = button.getAttribute('label');
|
||||
const emojiObject = filteredEmojis.find((emoji) => emoji.emoji === buttonEmoji);
|
||||
if (emojiObject) {
|
||||
button.hidden = !emojiObject.tags.some((tag) => tag.toLowerCase().includes(value));
|
||||
button.style.order = emojiObject.order;
|
||||
} else {
|
||||
button.hidden = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// note: It's async on purpose so we can render the popup before processing the emojis
|
||||
async #onPopupShowing(event) {
|
||||
if (event.target !== this.#panel) return;
|
||||
this.searchInput.value = '';
|
||||
const emojiList = this.emojiList;
|
||||
for (const emoji of this.#emojis) {
|
||||
const item = document.createXULElement('toolbarbutton');
|
||||
item.className = 'toolbarbutton-1 zen-emojis-picker-emoji';
|
||||
item.setAttribute('label', emoji.emoji);
|
||||
item.setAttribute('tooltiptext', emoji.annotation);
|
||||
item.addEventListener('command', () => {
|
||||
this.#selectEmoji(emoji.emoji);
|
||||
});
|
||||
emojiList.appendChild(item);
|
||||
}
|
||||
setTimeout(() => {
|
||||
this.searchInput.focus();
|
||||
}, 500);
|
||||
}
|
||||
|
||||
#onPopupHidden(event) {
|
||||
if (event.target !== this.#panel) return;
|
||||
this.#clearEmojis();
|
||||
|
||||
const emojiList = this.emojiList;
|
||||
emojiList.innerHTML = '';
|
||||
|
||||
if (this.#currentPromiseReject) {
|
||||
this.#currentPromiseReject(new Error('Emoji picker closed without selection'));
|
||||
}
|
||||
|
||||
this.#currentPromise = null;
|
||||
this.#currentPromiseResolve = null;
|
||||
this.#currentPromiseReject = null;
|
||||
|
||||
this.#anchor.removeAttribute('zen-emoji-open');
|
||||
this.#anchor = null;
|
||||
}
|
||||
|
||||
#selectEmoji(emoji) {
|
||||
this.#currentPromiseResolve?.(emoji);
|
||||
this.#panel.hidePopup();
|
||||
}
|
||||
|
||||
open(anchor) {
|
||||
if (this.#currentPromise) {
|
||||
return null;
|
||||
}
|
||||
this.#currentPromise = new Promise((resolve, reject) => {
|
||||
this.#currentPromiseResolve = resolve;
|
||||
this.#currentPromiseReject = reject;
|
||||
});
|
||||
this.#anchor = anchor;
|
||||
this.#anchor.setAttribute('zen-emoji-open', 'true');
|
||||
this.#panel.openPopup(anchor, 'after_start', 0, 0, false, false);
|
||||
return this.#currentPromise;
|
||||
}
|
||||
}
|
||||
|
||||
window.gZenEmojiPicker = new ZenEmojiPicker();
|
||||
}
|
||||
1
src/zen/common/emojis/ZenEmojisData.min.mjs
Normal file
1
src/zen/common/emojis/ZenEmojisData.min.mjs
Normal file
File diff suppressed because one or more lines are too long
56
src/zen/common/emojis/fetch_emojis.py
Normal file
56
src/zen/common/emojis/fetch_emojis.py
Normal file
@@ -0,0 +1,56 @@
|
||||
|
||||
import os
|
||||
import requests
|
||||
import json
|
||||
|
||||
|
||||
def get_emojis(url):
|
||||
"""
|
||||
Fetches emojis from the given URL and formats them into a JavaScript module.
|
||||
|
||||
Args:
|
||||
url (str): The URL to fetch the emoji data from.
|
||||
|
||||
Returns:
|
||||
array: A JavaScript array of emoji objects formatted for use in a module.
|
||||
"""
|
||||
response = requests.get(url)
|
||||
response.raise_for_status() # Raise an error for bad responses
|
||||
emojis_data = response.json()
|
||||
|
||||
# We only want "tags", "emoji" amd "order" from the dictionaries inside this array
|
||||
emojis = []
|
||||
for emoji in emojis_data:
|
||||
emojis.append({
|
||||
"tags": emoji.get("tags", []),
|
||||
"order": emoji.get("order", 0),
|
||||
"emoji": emoji.get("emoji", "")
|
||||
})
|
||||
return emojis
|
||||
|
||||
|
||||
def get_js_code(emojis):
|
||||
"""
|
||||
Generates JavaScript code to export the emojis as a module.
|
||||
|
||||
Args:
|
||||
emojis (list): A list of emoji dictionaries.
|
||||
|
||||
Returns:
|
||||
str: JavaScript code as a string.
|
||||
"""
|
||||
js_code = "var ZenEmojisData = "
|
||||
# dump without unicode escape
|
||||
js_code += json.dumps(emojis, ensure_ascii=False)
|
||||
return js_code
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
# Define the URL for the emoji JSON file
|
||||
url = "https://cdn.jsdelivr.net/npm/emoji-picker-element-data@^1/en/emojibase/data.json"
|
||||
emojis_path = os.path.join(os.path.dirname(__file__), "ZenEmojisData.min.mjs")
|
||||
emojis = get_emojis(url)
|
||||
js_code = get_js_code(emojis)
|
||||
with open(emojis_path, "w", encoding="utf-8") as file:
|
||||
file.write(js_code)
|
||||
print(f"Emojis data has been written to {emojis_path}")
|
||||
@@ -26,7 +26,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
:root[zen-before-loaded='true'] #browser > *:not(#zen-browser-background, #zen-toast-container),
|
||||
:root[zen-before-loaded='true'] #browser > *:not(#zen-toast-container),
|
||||
:root[zen-before-loaded='true'] #urlbar {
|
||||
opacity: 0 !important;
|
||||
}
|
||||
@@ -78,13 +78,17 @@
|
||||
transition: background-color var(--inactive-window-transition);
|
||||
}
|
||||
|
||||
#zen-browser-grain {
|
||||
content: '';
|
||||
& #zen-browser-grain {
|
||||
display: none;
|
||||
}
|
||||
|
||||
:root[zen-show-grainy-background='true'] & #zen-browser-grain {
|
||||
display: flex;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background-image: url(chrome://browser/content/zen-images/grain-bg.png);
|
||||
pointer-events: none;
|
||||
z-index: 0;
|
||||
z-index: 1;
|
||||
opacity: var(--zen-grainy-background-opacity, 0);
|
||||
mix-blend-mode: overlay;
|
||||
transition: opacity 0.3s ease-in-out;
|
||||
@@ -115,7 +119,8 @@
|
||||
|
||||
#zen-main-app-wrapper {
|
||||
background: var(--zen-themed-toolbar-bg-transparent);
|
||||
overflow: hidden;
|
||||
/* See bug #8814, don't an overflow here as it causes issues
|
||||
* with firefox's rendering of the tab bar */
|
||||
|
||||
& > * {
|
||||
z-index: 1;
|
||||
|
||||
@@ -400,6 +400,8 @@ menuseparator {
|
||||
min-width: unset !important;
|
||||
margin: 0px !important;
|
||||
border-radius: calc(var(--zen-native-inner-radius) + 2px) !important;
|
||||
background: light-dark(rgba(255, 255, 255, 0.1), rgba(0, 0, 0, 0.1)) !important;
|
||||
border: 1px solid light-dark(rgba(255, 255, 255, 0.15), rgba(0, 0, 0, 0.15)) !important;
|
||||
|
||||
:root[zen-right-side='true'] & {
|
||||
order: -1;
|
||||
@@ -416,3 +418,7 @@ menuseparator {
|
||||
padding: 0 !important;
|
||||
min-width: unset !important;
|
||||
}
|
||||
|
||||
#window-modal-dialog {
|
||||
inset: 0;
|
||||
}
|
||||
|
||||
@@ -35,3 +35,66 @@ body > #confetti {
|
||||
#PersonalToolbar:not([collapsed='true']) {
|
||||
min-height: 30px;
|
||||
}
|
||||
|
||||
/* Firefox View */
|
||||
#firefox-view-button {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
/* Emojis picker */
|
||||
|
||||
#PanelUI-zen-emojis-picker {
|
||||
--panel-width: 250px;
|
||||
--panel-padding: 0px;
|
||||
|
||||
#PanelUI-zen-emojis-picker-header {
|
||||
gap: 10px;
|
||||
align-items: center;
|
||||
padding: 10px;
|
||||
padding-bottom: 5px;
|
||||
}
|
||||
|
||||
#PanelUI-zen-emojis-picker-none label {
|
||||
display: none;
|
||||
}
|
||||
|
||||
#PanelUI-zen-emojis-picker-search {
|
||||
padding: 4px;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
#PanelUI-zen-emojis-picker-list {
|
||||
flex-wrap: wrap;
|
||||
max-height: 265px;
|
||||
overflow-y: auto;
|
||||
overflow-x: hidden;
|
||||
|
||||
padding: 10px;
|
||||
padding-top: 5px;
|
||||
|
||||
gap: 5px;
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fill, minmax(28px, 1fr));
|
||||
|
||||
.zen-emojis-picker-emoji {
|
||||
appearance: none;
|
||||
font-size: 14px;
|
||||
padding: 0px !important;
|
||||
& image {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.zen-emojis-picker-emoji,
|
||||
#PanelUI-zen-emojis-picker-none {
|
||||
width: 22px;
|
||||
height: 22px;
|
||||
|
||||
&:hover {
|
||||
background-color: light-dark(rgba(0, 0, 0, 0.1), rgba(255, 255, 255, 0.1));
|
||||
border-radius: 4px;
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,7 +10,6 @@
|
||||
}
|
||||
|
||||
:root[zen-single-toolbar='true'] {
|
||||
--urlbar-container-padding: 4px;
|
||||
& #urlbar:not([breakout-extend='true']) {
|
||||
padding: 1px;
|
||||
--toolbarbutton-border-radius: 6px;
|
||||
@@ -26,7 +25,7 @@
|
||||
|
||||
--urlbar-margin-inline: 5px;
|
||||
--urlbar-container-padding: 5px;
|
||||
:root[zen-single-toolbar='true'] {
|
||||
:root[zen-single-toolbar='true'] & {
|
||||
--urlbar-container-padding: 4px;
|
||||
}
|
||||
}
|
||||
@@ -467,11 +466,11 @@ button.popup-notification-dropmarker {
|
||||
#urlbar[open][zen-floating-urlbar='true'] {
|
||||
z-index: 1000;
|
||||
max-width: unset;
|
||||
min-width: unset !important;
|
||||
--urlbar-container-height: 55px !important;
|
||||
--urlbar-margin-inline: 10px !important;
|
||||
|
||||
width: min(90%, 50rem) !important;
|
||||
min-width: min(90%, 50rem) !important;
|
||||
width: var(--zen-urlbar-width, min(90%, 50rem)) !important;
|
||||
font-size: 1.15em !important;
|
||||
@media (-moz-platform: macos) {
|
||||
font-size: 1.5em !important;
|
||||
|
||||
@@ -82,12 +82,34 @@ document.addEventListener(
|
||||
case 'cmd_zenReplacePinnedUrlWithCurrent':
|
||||
gZenPinnedTabManager.replacePinnedUrlWithCurrent();
|
||||
break;
|
||||
case 'cmd_zenAddToEssentials':
|
||||
case 'cmd_contextZenAddToEssentials':
|
||||
gZenPinnedTabManager.addToEssentials();
|
||||
break;
|
||||
case 'cmd_zenRemoveFromEssentials':
|
||||
case 'cmd_contextZenRemoveFromEssentials':
|
||||
gZenPinnedTabManager.removeEssentials();
|
||||
break;
|
||||
case 'cmd_zenCtxDeleteWorkspace':
|
||||
gZenWorkspaces.contextDeleteWorkspace(event);
|
||||
break;
|
||||
case 'cmd_zenChangeWorkspaceName':
|
||||
gZenVerticalTabsManager.renameTabStart({
|
||||
target: gZenWorkspaces.activeWorkspaceIndicator.querySelector(
|
||||
'.zen-current-workspace-indicator-name'
|
||||
),
|
||||
});
|
||||
break;
|
||||
case 'cmd_zenChangeWorkspaceIcon':
|
||||
gZenWorkspaces.changeWorkspaceIcon();
|
||||
break;
|
||||
case 'cmd_zenReorderWorkspaces':
|
||||
gZenUIManager.showToast('zen-workspaces-how-to-reorder-title', {
|
||||
timeout: 9000,
|
||||
descriptionId: 'zen-workspaces-how-to-reorder-desc',
|
||||
});
|
||||
break;
|
||||
case 'cmd_zenOpenWorkspaceCreation':
|
||||
gZenWorkspaces.openWorkspaceCreation(event);
|
||||
break;
|
||||
default:
|
||||
if (event.target.id.startsWith('cmd_zenWorkspaceSwitch')) {
|
||||
const index = parseInt(event.target.id.replace('cmd_zenWorkspaceSwitch', ''), 10) - 1;
|
||||
|
||||
@@ -95,11 +95,6 @@ var ZenThemeModifier = {
|
||||
updateAccentColor() {
|
||||
const accentColor = Services.prefs.getStringPref('zen.theme.accent-color');
|
||||
document.documentElement.style.setProperty('--zen-primary-color', accentColor);
|
||||
// Notify the page that the accent color has changed, only if a function
|
||||
// handler is defined.
|
||||
if (typeof window.zenPageAccentColorChanged === 'function') {
|
||||
window.zenPageAccentColorChanged(accentColor);
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
@@ -36,10 +36,12 @@ var gZenCompactModeManager = {
|
||||
preInit() {
|
||||
// Remove it before initializing so we can properly calculate the width
|
||||
// of the sidebar at startup and avoid overflowing items not being hidden
|
||||
const isCompactMode =
|
||||
lazyCompactMode.mainAppWrapper.getAttribute('zen-compact-mode') === 'true';
|
||||
this._wasInCompactMode = Services.xulStore.getValue(
|
||||
AppConstants.BROWSER_CHROME_URL,
|
||||
'zen-main-app-wrapper',
|
||||
'zen-compact-mode'
|
||||
);
|
||||
lazyCompactMode.mainAppWrapper.removeAttribute('zen-compact-mode');
|
||||
this._wasInCompactMode = isCompactMode;
|
||||
|
||||
this.addContextMenu();
|
||||
},
|
||||
@@ -211,8 +213,11 @@ var gZenCompactModeManager = {
|
||||
return;
|
||||
}
|
||||
let sidebarWidth = this.sidebar.getBoundingClientRect().width;
|
||||
const shouldRecalculate =
|
||||
this.preference || document.documentElement.hasAttribute('zen-creating-workspace');
|
||||
const sidebarExpanded = document.documentElement.hasAttribute('zen-sidebar-expanded');
|
||||
if (sidebarWidth > 1) {
|
||||
if (this.preference && gZenVerticalTabsManager._prefsSidebarExpanded) {
|
||||
if (shouldRecalculate && sidebarExpanded) {
|
||||
sidebarWidth = Math.max(sidebarWidth, 150);
|
||||
}
|
||||
// Second variable to get the genuine width of the sidebar
|
||||
@@ -220,8 +225,8 @@ var gZenCompactModeManager = {
|
||||
window.dispatchEvent(new window.Event('resize')); // To recalculate the layout
|
||||
if (
|
||||
event &&
|
||||
this.preference &&
|
||||
gZenVerticalTabsManager._prefsSidebarExpanded &&
|
||||
shouldRecalculate &&
|
||||
sidebarExpanded &&
|
||||
!gZenVerticalTabsManager._hadSidebarCollapse
|
||||
) {
|
||||
return;
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
}
|
||||
|
||||
#navigator-toolbox {
|
||||
--zen-toolbox-max-width: 66px !important;
|
||||
--zen-toolbox-max-width: 74px !important;
|
||||
--zen-compact-float: var(--zen-element-separation);
|
||||
|
||||
/* Initial padding for when we are animating */
|
||||
@@ -391,7 +391,7 @@
|
||||
) {
|
||||
& #zen-appcontent-navbar-container {
|
||||
visibility: visible !important;
|
||||
&::before {
|
||||
:root[zen-show-grainy-background='true'] &::before {
|
||||
content: '';
|
||||
position: absolute;
|
||||
top: 0;
|
||||
|
||||
@@ -122,17 +122,18 @@
|
||||
|
||||
showSidebarButtons(animate = false) {
|
||||
if (this.sidebarButtons.hasAttribute('hidden') && animate) {
|
||||
if (gZenVerticalTabsManager._prefsRightSide) {
|
||||
this.sidebarButtons.setAttribute('right', true);
|
||||
} else {
|
||||
this.sidebarButtons.setAttribute('right', false);
|
||||
}
|
||||
const isRightSide = gZenVerticalTabsManager._prefsRightSide;
|
||||
this.sidebarButtons.setAttribute('right', isRightSide);
|
||||
|
||||
for (const button of this.sidebarButtons.querySelectorAll('toolbarbutton')) {
|
||||
button.style.opacity = 0;
|
||||
}
|
||||
|
||||
const startX = isRightSide ? -50 : 50;
|
||||
|
||||
gZenUIManager.motion.animate(
|
||||
this.sidebarButtons.querySelectorAll('toolbarbutton'),
|
||||
{ x: [50, 0], opacity: [0, 1] },
|
||||
{ x: [startX, 0], opacity: [0, 1] },
|
||||
{ delay: gZenUIManager.motion.stagger(0.1) }
|
||||
);
|
||||
}
|
||||
@@ -227,6 +228,7 @@
|
||||
}
|
||||
)
|
||||
.then(() => {
|
||||
gBrowser.tabContainer._invalidateCachedTabs();
|
||||
this.#currentBrowser.removeAttribute('animate-glance-open');
|
||||
this.overlay.style.removeProperty('overflow');
|
||||
this.browserWrapper.removeAttribute('animate');
|
||||
@@ -614,6 +616,7 @@
|
||||
}
|
||||
|
||||
finishOpeningGlance() {
|
||||
gBrowser.tabContainer._invalidateCachedTabs();
|
||||
gZenWorkspaces.updateTabsContainers();
|
||||
this.browserWrapper.removeAttribute('animate-full');
|
||||
this.overlay.classList.remove('zen-glance-overlay');
|
||||
@@ -661,7 +664,7 @@
|
||||
type: 'spring',
|
||||
}
|
||||
);
|
||||
gZenViewSplitter.deactivateCurrentSplitView();
|
||||
gZenViewSplitter.deactivateCurrentSplitView({ removeDeckSelected: true });
|
||||
this.finishOpeningGlance();
|
||||
}
|
||||
|
||||
@@ -747,6 +750,13 @@
|
||||
}
|
||||
|
||||
onSearchSelectCommand(where) {
|
||||
// Check if Glance is globally enabled and specifically enabled for contextmenu/search
|
||||
if (
|
||||
!Services.prefs.getBoolPref('zen.glance.enabled', false) ||
|
||||
!Services.prefs.getBoolPref('zen.glance.enable-contextmenu-search', true)
|
||||
) {
|
||||
return;
|
||||
}
|
||||
if (where !== 'tab') {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1019,8 +1019,6 @@ var gZenKeyboardShortcutsManager = {
|
||||
this._applyShortcuts();
|
||||
|
||||
await this._saveShortcuts();
|
||||
|
||||
console.info('Zen CKS: Initialized');
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
@@ -21,8 +21,6 @@
|
||||
}).format(new Date().getTime());
|
||||
|
||||
constructor() {
|
||||
console.log('[ZenMods]: Initializing ZenMods module');
|
||||
|
||||
super();
|
||||
}
|
||||
|
||||
@@ -157,31 +155,33 @@
|
||||
continue;
|
||||
}
|
||||
|
||||
if (type === 'checkbox') {
|
||||
const value = Services.prefs.getBoolPref(property, false);
|
||||
if (typeof defaultValue !== 'boolean') {
|
||||
console.warn(
|
||||
'[ZenMods]: Warning, invalid data type received for expected type boolean, skipping.'
|
||||
);
|
||||
continue;
|
||||
}
|
||||
const getProperty =
|
||||
type === 'checkbox' ? Services.prefs.getBoolPref : Services.prefs.getStringPref;
|
||||
const setProperty =
|
||||
type === 'checkbox' ? Services.prefs.setBoolPref : Services.prefs.setStringPref;
|
||||
|
||||
if (!value) {
|
||||
Services.prefs.setBoolPref(property, defaultValue);
|
||||
}
|
||||
} else {
|
||||
const value = Services.prefs.getStringPref(property, 'zen-property-no-saved');
|
||||
try {
|
||||
getProperty(property);
|
||||
} catch {
|
||||
console.debug(
|
||||
`[ZenMods]: Setting default value for ${property} to ${defaultValue} (${typeof defaultValue})`
|
||||
);
|
||||
|
||||
if (typeof defaultValue !== 'string' && typeof defaultValue !== 'number') {
|
||||
if (
|
||||
typeof defaultValue !== 'boolean' &&
|
||||
typeof defaultValue !== 'string' &&
|
||||
typeof defaultValue !== 'number'
|
||||
) {
|
||||
console.warn(
|
||||
`[ZenMods]: Warning, invalid data type received (${typeof defaultValue}), skipping.`
|
||||
);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (value === 'zen-property-no-saved') {
|
||||
Services.prefs.setStringPref(property, defaultValue.toString());
|
||||
}
|
||||
setProperty(
|
||||
property,
|
||||
typeof defaultValue === 'boolean' ? defaultValue : defaultValue.toString()
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -403,7 +403,7 @@
|
||||
}
|
||||
|
||||
get updatePref() {
|
||||
return 'zen.themes.updated-value-observer';
|
||||
return 'zen.mods.updated-value-observer';
|
||||
}
|
||||
|
||||
get modsRootPath() {
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user