-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Request] Make tab count less intrusive #5
Comments
The title preface is a feature offered by Firefox's extension API and unfortunately there doesn't seem to be a similar property for setting a suffix. You could probably modify a window's title by changing the active tab's title using some injected JavaScript but that has a number of drawbacks:
Your second suggestion of only changing the title preface when there is a single tab is interesting and should certainly be possible. The only question is how such a feature should be implemented. I can think of a couple of alternatives:
|
Thanks @Lej77. That makes sense in your response to the first suggestion. Regarding the other three options, I guess the greater flexibility the better IMO.
I think that this is a bit too restrictive. What if users wanted to do the opposite, i.e. only set the preface for windows with 1 tab?
That sounds pretty good to me! I also realised that all of these solutions would allow users to use a shorter string for one/more tabs (e.g. some obscure character), which would only used to match the TST rule.
I don't entirely understand this one. Are you saying that if |
I do indeed mean that if |
Awesome! That sounds promising. Thank you for the response. |
I have released a new version of the extension (v5.0) that has a Edit: make sure you are using version 5.3 or later of the extension when you are testing the format I suggested since there was a race condition when the format evaluated to an empty string. The fix for that race condition was released in that version. Edit 2: using only an empty space for the css rules might cause flickering if the title format is ever evaluated to an empty string since I clear such title prefaces by settings the preface to " " first and then "" to handle some limitations of the WebExtension API. Edit 3: you can use a zero sized character to apply css rules without changing you window title. So a format like Otherwise you can of course use any character you want so a format like |
Absolutely brilliant! Thank you! The zero-width character works perfectly! |
This add-on sounds like a excellent workaround to hide TST when there's a single tab. However, I find that the tab count as a prefix for all windows a bit annoying, because it makes this number more important than the name of the window. For example, in my panel, the tab-count prefix leaves less space for the window title:
I could think of two different possibilities.
titlepreface
?The text was updated successfully, but these errors were encountered: