diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 4ae566506..4292f36d3 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -38,7 +38,7 @@ on: required: true default: 'alpha' type: 'string' - + jobs: build-data: permissions: @@ -416,8 +416,8 @@ jobs: zen.installer-generic.exe zen.macos-x64.dmg zen.macos-aarch64.dmg - tag_name: "twilight" - name: "Twilight build - ${{ needs.build-data.outputs.version }} (${{ needs.build-data.outputs.build_date }})" + tag_name: 'twilight' + name: 'Twilight build - ${{ needs.build-data.outputs.version }} (${{ needs.build-data.outputs.build_date }})' body: | # Zen Twilight Build diff --git a/.github/workflows/twilight-release-schedule.yml b/.github/workflows/twilight-release-schedule.yml index bfa010467..c9bc5b92a 100644 --- a/.github/workflows/twilight-release-schedule.yml +++ b/.github/workflows/twilight-release-schedule.yml @@ -28,4 +28,4 @@ jobs: with: node-version: 20 - # TODO: \ No newline at end of file + # TODO: diff --git a/.github/workflows/windows-profile-build.yml b/.github/workflows/windows-profile-build.yml index c4512d9cb..a0e48c016 100644 --- a/.github/workflows/windows-profile-build.yml +++ b/.github/workflows/windows-profile-build.yml @@ -14,7 +14,7 @@ on: description: 'The branch to build' required: true type: string - + jobs: windows-profile-build: name: Windows Profile Build - ${{ matrix.generic == true && 'generic' || 'specific' }} diff --git a/.github/workflows/windows-release-build.yml b/.github/workflows/windows-release-build.yml index 8b951d8df..8905bec3a 100644 --- a/.github/workflows/windows-release-build.yml +++ b/.github/workflows/windows-release-build.yml @@ -220,7 +220,7 @@ jobs: with: name: windows-x64-obj-${{ matrix.generic == true && 'generic' || 'specific' }} path: engine/obj-x86_64-pc-windows-msvc/ - + - name: Upload zip file if twilight branch if: ${{ inputs.release-branch == 'twilight' && !inputs.generate-gpo }} uses: actions/upload-artifact@v4 @@ -241,10 +241,10 @@ jobs: with: name: windows${{ matrix.generic == true && '-generic' || '' }}.mar path: ./windows${{ matrix.generic == true && '-generic' || '' }}.mar - + - name: Upload update manifests if twilight branch if: ${{ inputs.release-branch == 'twilight' && !inputs.generate-gpo }} uses: actions/upload-artifact@v4 with: name: windows_update_manifest_${{ matrix.generic == true && 'generic' || 'specific' }} - path: ./dist/update \ No newline at end of file + path: ./dist/update diff --git a/README.md b/README.md index b7119ae6c..3f736e22c 100644 --- a/README.md +++ b/README.md @@ -80,6 +80,7 @@ bash <(curl https://updates.zen-browser.app/appimage.sh) ``` #### Flatpak + ``` flatpak install flathub io.github.zen_browser.zen ``` @@ -132,6 +133,7 @@ pnpm start ### Development To view changes you've made, run + ```bash pnpm build:ui && pnpm start ``` diff --git a/src/browser/base/content/ZenCustomizableUI.sys.mjs b/src/browser/base/content/ZenCustomizableUI.sys.mjs index da5d529e2..c736ca2b3 100644 --- a/src/browser/base/content/ZenCustomizableUI.sys.mjs +++ b/src/browser/base/content/ZenCustomizableUI.sys.mjs @@ -1,28 +1,21 @@ - -export var ZenCustomizableUI = new class { +export var ZenCustomizableUI = new (class { constructor() {} TYPE_TOOLBAR = 'toolbar'; - defaultSidebarIcons = [ - 'zen-sidepanel-button', - 'zen-workspaces-button', - 'new-tab-button' - ]; + defaultSidebarIcons = ['zen-sidepanel-button', 'zen-workspaces-button', 'new-tab-button']; startup(CustomizableUIInternal) { CustomizableUIInternal.registerArea( - "zen-sidebar-top-buttons", + 'zen-sidebar-top-buttons', { type: this.TYPE_TOOLBAR, - defaultPlacements: [ - "preferences-button", "zen-expand-sidebar-button", "zen-profile-button" - ], + defaultPlacements: ['preferences-button', 'zen-expand-sidebar-button', 'zen-profile-button'], defaultCollapsed: null, }, true ); CustomizableUIInternal.registerArea( - "zen-sidebar-icons-wrapper", + 'zen-sidebar-icons-wrapper', { type: this.TYPE_TOOLBAR, defaultPlacements: this.defaultSidebarIcons, @@ -92,7 +85,7 @@ export var ZenCustomizableUI = new class { _moveWindowButtons(window) { const windowControls = window.document.getElementsByClassName('titlebar-buttonbox-container'); const toolboxIcons = window.document.getElementById('zen-sidebar-top-buttons-customization-target'); - if (window.AppConstants.platform === "macosx") { + if (window.AppConstants.platform === 'macosx') { for (let i = 0; i < windowControls.length; i++) { if (i === 0) { toolboxIcons.prepend(windowControls[i]); @@ -104,9 +97,7 @@ export var ZenCustomizableUI = new class { } _hideToolbarButtons(window) { - const elementsToHide = [ - 'alltabs-button', - ]; + const elementsToHide = ['alltabs-button']; for (let id of elementsToHide) { const elem = window.document.getElementById(id); if (elem) { @@ -116,11 +107,7 @@ export var ZenCustomizableUI = new class { } registerToolbarNodes(window) { - window.CustomizableUI.registerToolbarNode( - window.document.getElementById('zen-sidebar-top-buttons') - ); - window.CustomizableUI.registerToolbarNode( - window.document.getElementById('zen-sidebar-icons-wrapper') - ); + window.CustomizableUI.registerToolbarNode(window.document.getElementById('zen-sidebar-top-buttons')); + window.CustomizableUI.registerToolbarNode(window.document.getElementById('zen-sidebar-icons-wrapper')); } -}; +})(); diff --git a/src/browser/base/content/ZenStartup.mjs b/src/browser/base/content/ZenStartup.mjs index c541a8111..f2b9f8961 100644 --- a/src/browser/base/content/ZenStartup.mjs +++ b/src/browser/base/content/ZenStartup.mjs @@ -126,7 +126,7 @@ }, _initSearchBar() { - // Only focus the url bar + // Only focus the url bar gURLBar.focus(); gURLBar._initCopyCutController(); @@ -147,7 +147,7 @@ Note: This developer console is not the same as the browser console, it has access to Zen's internal functions and variables, including your passwords and other sensitive information. Please do not paste any code here unless you know what you are doing. `); - } + }, }; ZenStartup.init(); diff --git a/src/browser/base/content/ZenUIManager.mjs b/src/browser/base/content/ZenUIManager.mjs index 01e105585..691046234 100644 --- a/src/browser/base/content/ZenUIManager.mjs +++ b/src/browser/base/content/ZenUIManager.mjs @@ -1,8 +1,7 @@ var gZenUIManager = { _popupTrackingElements: [], - init () { - + init() { document.addEventListener('popupshowing', this.onPopupShowing.bind(this)); document.addEventListener('popuphidden', this.onPopupHidden.bind(this)); }, @@ -67,7 +66,7 @@ var gZenUIManager = { element.removeAttribute('has-popup-menu'); } else { this.__removeHasPopupAttribute = () => element.removeAttribute('has-popup-menu'); - document.addEventListener('mousemove', this.__removeHasPopupAttribute, {once: true}); + document.addEventListener('mousemove', this.__removeHasPopupAttribute, { once: true }); } this.__currentPopup = null; this.__currentPopupTrackElement = null; @@ -85,23 +84,18 @@ var gZenVerticalTabsManager = { this._updateEvent(); this.initRightSideOrderContextMenu(); - let tabs = document.getElementById("tabbrowser-tabs"); + let tabs = document.getElementById('tabbrowser-tabs'); - XPCOMUtils.defineLazyPreferenceGetter( - this, - "canOpenTabOnMiddleClick", - "zen.tabs.newtab-on-middle-click", - true - ); + XPCOMUtils.defineLazyPreferenceGetter(this, 'canOpenTabOnMiddleClick', 'zen.tabs.newtab-on-middle-click', true); if (tabs) { - tabs.addEventListener("mouseup", this.openNewTabOnTabsMiddleClick.bind(this)); + tabs.addEventListener('mouseup', this.openNewTabOnTabsMiddleClick.bind(this)); } }, openNewTabOnTabsMiddleClick(event) { - if (event.button === 1 && event.target.id === "tabbrowser-tabs" && this.canOpenTabOnMiddleClick) { - document.getElementById("cmd_newNavigatorTabNoEvent").doCommand(); + if (event.button === 1 && event.target.id === 'tabbrowser-tabs' && this.canOpenTabOnMiddleClick) { + document.getElementById('cmd_newNavigatorTabNoEvent').doCommand(); event.stopPropagation(); event.preventDefault(); } @@ -157,8 +151,12 @@ var gZenVerticalTabsManager = { this.navigatorToolbox.removeAttribute('zen-expanded'); } - if (this.navigatorToolbox.hasAttribute('zen-expanded') && !this.navigatorToolbox.hasAttribute('zen-right-side') - && !Services.prefs.getBoolPref('zen.view.compact') && !Services.prefs.getBoolPref('zen.view.sidebar-expanded.on-hover')) { + if ( + this.navigatorToolbox.hasAttribute('zen-expanded') && + !this.navigatorToolbox.hasAttribute('zen-right-side') && + !Services.prefs.getBoolPref('zen.view.compact') && + !Services.prefs.getBoolPref('zen.view.sidebar-expanded.on-hover') + ) { this.navigatorToolbox.prepend(topButtons); browser.prepend(this.navigatorToolbox); } else { diff --git a/src/browser/base/content/zen-assets.inc.xhtml b/src/browser/base/content/zen-assets.inc.xhtml index 357372290..9ec347a6f 100644 --- a/src/browser/base/content/zen-assets.inc.xhtml +++ b/src/browser/base/content/zen-assets.inc.xhtml @@ -23,20 +23,15 @@ - +