Add option to hide the notification count in the twitter title
The purpose of this PR is to hide the notification count in the title of twitter. It's a setting that can be set to true (DO hide notifications) or false (DON'T hide them).
If you refresh the page, it works just as you'd expect. However, if you're on the page and change the setting, things get a little complicated. There's 3 implementations I could think of-
-
Switching from true->false requires a refresh, switching from false->true kicks in immediately. This is what I went with. The user can see right away when they switch from false to true that it's working. If they switch from true to false, then it kind of just reads as "I don't have any new notifications."
-
Switching from true->false requires a refresh to kick in, switching from false->true requires a refresh to kick in. This feels worse than number 1, however it would be more consistent.
-
Everything kicks in immediately. While this is ideal, to make the true->false case work dynamically you'd need to keep track of the notification count as the user is browsing twitter. At the very least you'd have to make a couple new global objects that communicate with main.js/changeTitleNotifications, I think. It would be pretty messy and doesn't really feel worth it.
https://github.com/thomaswang/minimal-twitter/discussions/101
https://github.com/typefully/minimal-twitter/pull/141/commits/9f7c6467afebec3402195799b39462a80a8f6c2e — finally landing this, thanks for helping @noopnoop!
np :)