Skip to content

Commit

Permalink
Restore "unread" tab Attribute
Browse files Browse the repository at this point in the history
This restore the `unread` tab Attribute that was removed all the way back in Firefox 61.
This is useful for theming since it allows custom CSS styling for tabs that has been opened in the background but haven't been actually viewed yet.

https://bugzilla.mozilla.org/show_bug.cgi?id=1453957
  • Loading branch information
goodusername123 authored Oct 13, 2024
1 parent e282bf2 commit 998338e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions browser/components/tabbrowser/content/tabbrowser.js
Original file line number Diff line number Diff line change
Expand Up @@ -1312,6 +1312,7 @@
if (!this._previewMode) {
newTab.recordTimeFromUnloadToReload();
newTab.updateLastAccessed();
newTab.removeAttribute("unread");
oldTab.updateLastAccessed();
// if this is the foreground window, update the last-seen timestamps.
if (this.ownerGlobal == BrowserWindowTracker.getTopWindow()) {
Expand Down Expand Up @@ -6997,6 +6998,9 @@

this.mTab.setAttribute("bursting", "true");
}

if (!this.mTab.selected)
this.mTab.setAttribute("unread", "true");
}

if (this.mTab.hasAttribute("progress")) {
Expand Down

0 comments on commit 998338e

Please sign in to comment.