tab-counter-plus icon indicating copy to clipboard operation
tab-counter-plus copied to clipboard

Allow to disable the counter

Open Loirooriol opened this issue 6 years ago • 6 comments

It seems some people are fine with clicking the browserAction when they want to see the number of tabs, and don't need the counter to be always present: https://github.com/DaAwesomeP/tab-counter/issues/12

Tab Counter Plus does not continuously query tabs and then there is almost no performance hit to be avoided, but I can consider adding this option.

Loirooriol avatar Jun 26 '18 16:06 Loirooriol

I think that would Great

StoopidoMan avatar Mar 30 '21 14:03 StoopidoMan

I have another suggestion concerning this. It would be nice to make some setting to hide the counter compleately while window has less than X amount of tabs, and then re-enable it when there is more than X tabs.

For now, I managed to implement this via userChrome.css to enable the counter only when tabs overflow, like this:

#tabbrowser-tabs:not([overflow]) ~ #tab-counter-plus_loirooriol-browser-action {
	display: none !important;
}

#tabbrowser-tabs[overflow] ~ #tab-counter-plus_loirooriol-browser-action {
	display: -moz-box !important;
}

I placed my counter on the title-bar, instead of address bar, too. I also removed right spacer via CSS, so now tab counter acts as a useful spacer when tabs overflow!

But having build-in, customisable solution for specific number of tabs would be nice too!

ScienceDiscoverer avatar Jun 14 '22 14:06 ScienceDiscoverer

There is no API to completely hide a browser action. I can disable it, or show a plain image instead of a counter, but not hide it.

Hiding page actions was possible but I think they changed it, since in V3 there is just "action".

Loirooriol avatar Jun 14 '22 15:06 Loirooriol

BTW, you can inject some CSS to hide the counter except on hover. I do this to keep the UI clean but powerful.

Gitoffthelawn avatar Jun 15 '22 04:06 Gitoffthelawn

Users can do that with userChrome.css. My add-on can't do it because WebExtensions are heavily restricted.

Loirooriol avatar Jun 16 '22 09:06 Loirooriol

Right, sorry, I should have mentioned users performing the injection via userChrome.css.

Gitoffthelawn avatar Jun 17 '22 00:06 Gitoffthelawn