feat: Added pref for context menu refresh, b=no-bug, c=common, tabs

This commit is contained in:
Mr. M
2025-08-30 14:33:21 +02:00
parent bd4f5cee31
commit 07381c9a7a
4 changed files with 11 additions and 1 deletions

View File

@@ -51,3 +51,6 @@
- name: zen.view.drag-and-drop.drop-inside-lower-threshold
value: 30
- name: zen.view.context-menu.refresh
value: false

View File

@@ -78,6 +78,9 @@ var gZenUIManager = {
},
_debloatContextMenus() {
if (!Services.prefs.getBoolPref('zen.view.context-menu.refresh', false)) {
return;
}
const contextMenusToClean = [
// Remove the 'new tab below' context menu.
// reason: It doesn't properly work with zen and it's philosophy of not having

View File

@@ -805,6 +805,10 @@
if (selectedTab.group?.hasAttribute('split-view-group')) {
tabsToUnload = selectedTab.group.tabs;
}
const allAreUnloaded = tabsToUnload.every((tab) => tab.hasAttribute('pending'));
if (allAreUnloaded) {
return await this._onCloseTabShortcut(event, selectedTab, { behavior: 'close' });
}
await gBrowser.explicitUnloadTabs(tabsToUnload);
selectedTab.removeAttribute('discarded');
}

View File

@@ -19,7 +19,7 @@
"brandShortName": "Zen",
"brandFullName": "Zen Browser",
"release": {
"displayVersion": "1.15.2b",
"displayVersion": "1.15.3b",
"github": {
"repo": "zen-browser/desktop"
},