add open button to background tab toast (#9428)

* add open button to background tab toast

* address comment
This commit is contained in:
Fergus Yip
2025-07-13 01:41:23 +10:00
committed by GitHub
parent 60acb71aa6
commit 0fe812f218
2 changed files with 11 additions and 2 deletions

View File

@@ -163,7 +163,8 @@
list-style-image: url('search-page.svg') !important;
}
#open-file-button {
#open-file-button,
#zen-open-background-tab-button {
list-style-image: url('open.svg') !important;
}

View File

@@ -689,7 +689,15 @@ var gZenCompactModeManager = {
!this._nextTimeWillBeActive &&
this.canHideSidebar
) {
gZenUIManager.showToast('zen-background-tab-opened-toast');
gZenUIManager.showToast('zen-background-tab-opened-toast', {
button: {
id: 'zen-open-background-tab-button',
command: () => {
const targetWindow = window.ownerGlobal.parent || window;
targetWindow.gBrowser.selectedTab = tab;
},
},
});
}
delete this._nextTimeWillBeActive;
},