Easiest way to display count of open tabs?

Discussion of general topics about Mozilla Firefox
Post Reply
unbob
Posts: 143
Joined: December 13th, 2007, 9:43 am
Location: Merica

Easiest way to display count of open tabs?

Post by unbob »

I've used the 'Tabs2List' extension for years to obtain the count of my open tabs.

However, that method no longer works after updating to FF v113.0.1.

I'd hoped about:tabs would work but that does not exist.

Any suggestions? TIA
morat
Posts: 6403
Joined: February 3rd, 2009, 6:29 pm

Re: Easiest way to display count of open tabs?

Post by morat »

Try searching for an addon.

Search results for tab count
http://addons.mozilla.org/firefox/search/?q=tab+count

...

You can run the following code snippet to display the tab count using the browser console.

Code: Select all

gBrowser.tabs.length;
Instructions:

* open about:config page
* set devtools.chrome.enabled pref to true
* open browser console i.e. menu bar > tools > browser tools > browser console
* copy and paste code into browser console command line
* press enter to run

...

You can create a css counter to display the current tab number in the tab label using the userChrome.css file.

Code: Select all

tabs { counter-reset: alpha 0; }
tab { counter-increment: alpha 1; }
tab label.tab-label:before { content: counter(alpha) ". "; }
Or do something similar in the about:performance page using the userContent.css file.

Code: Select all

@-moz-document url-prefix("about:performance") {
  tbody { counter-reset: beta 0; }
  tr[data-l10n-id="item"] { counter-increment: beta 1; }
  td[data-l10n-id="type-addon"] { counter-increment: beta -1; }
  td[data-l10n-id="type-tab"]:after { content: " " counter(beta); }
}
Remember to set the toolkit.legacyUserProfileCustomizations.stylesheets pref to true, then restart.
Last edited by morat on May 20th, 2023, 8:15 am, edited 1 time in total.
unbob
Posts: 143
Joined: December 13th, 2007, 9:43 am
Location: Merica

Re: Easiest way to display count of open tabs?

Post by unbob »

morat wrote:Try searching for an addon.

Search results for tab count
http://addons.mozilla.org/firefox/search/?q=tab+count
That's the ticket! Decided to go with 'Tab Counter' extension.
https://addons.mozilla.org/en-US/firefo ... t/reviews/

Thanks for the reply!
morat
Posts: 6403
Joined: February 3rd, 2009, 6:29 pm

Re: Easiest way to display count of open tabs?

Post by morat »

You're welcome.

I like the about:performance page style the best. It adds a number after the "Tab" in the type column.
Post Reply