Lej77 / tab-count-in-window-title

6 stars 1 forks source link

Feature request: Option for sufix instead of prefix #6

Open Lew-Rockwell-Fan opened 4 years ago

Lew-Rockwell-Fan commented 4 years ago

If this allowed me to put the tab number to the right of the title, instead of the left, it would be useful. I like it otherwise - nice to have legible number instead of the insanely tiny font in the other similar extensions, but I have that space you use covered. And re-arranging the string in preferences does have some effects, but it won't put the number at the end.

Lej77 commented 4 years ago

This feature was just recently requested in issue #5 and there I wrote a comment answering why this isn't really possible with the current WebExtensions API. I could attempt to implement this by injecting JavaScript in tabs/web pages to change their titles but I feel that is a poor solution and I am not really motivated to perform what seems like a lot of work to get it to work correctly.

Edit: The URL in title extension appends the URL of each tab to that tab's title. Its code is very short but doesn't handle sites that dynamically change their titles, such as when navigating around on GitHub. This could probably be solved via a code suggestion left in a review for the Rename Tab Title extension that also renames tabs. So setting a tab's title could probably be done quite easily but it would be slightly harder to keep the title in sync with the wanted format. Especially if the suffix should be removed again when the user switches to a different tab (so that only the active tab has a modified title). Even if I do implement this it would still have the limitations that I listed in the other issue.