Open Loirooriol opened 6 years ago
I think that would Great
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!
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".
BTW, you can inject some CSS to hide the counter except on hover. I do this to keep the UI clean but powerful.
Users can do that with userChrome.css. My add-on can't do it because WebExtensions are heavily restricted.
Right, sorry, I should have mentioned users performing the injection via userChrome.css
.
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.