Styling of unread, but loaded tabs
I’d like to style unread, but loaded tabs. The wiki has a section Change styling of unread tabs with style that does not work. I searched in TabCenter Reborn for the string notselectedsinceload
, but could not find it. Is this feature actually not implemented?
This said I have for years this reliably working styling in my userChrome.css (color changed and comments translated; the :is()
selector is recently, though):
/* .tabbrowser-tab[notselectedsinceload="true"], /* does not work reliably, cf.
https://www.camp-firefox.de/forum/thema/125502-farbige-tab-s/ */
.tabbrowser-tab[titlechanged="true"]:not(:is([pending="true"], [selected="true"])) .tab-label {
/* in combination with addon "Tab Flag";
Attention: Title is periodically modified by some sites according to their own criteria */
color: magenta !important;
font-style: italic !important;
}
So I guess, I actually want some way to style tabs in the sidebar depending on the changed title.
The mentioned addon Tab Flag arose from the linked forum thread (it’s in German, by the way). There is also an example site where the styling with the first selector (commented above) does not work (despite having the notselectedsinceload attribute according to browser tools!), but with the addon and the other code: http://noip.magix.net/5sek.html (note this is a small test page, it should be used not that often and more important not too long).
Another test page wich works without addon is Demo: Page Visibility API.
Since it’s probably not good to add code that relies on a second addon I had another more general idea: Make it possible to style a tab depending on the tab title (attribute label according to browser tools), i.e. similar to such a userChrome.css rule:
.tabbrowser-tab[label="special string"], /* or */
.tabbrowser-tab[label^="special string"] /* or the other variations */
{ /* styling declarations */ }
This would not help in all cases, but at least for these sites which change the title on their own in a predictive way – and for all people using the addon. ;-)