Yet another favicon unread counter

Post plugins and custom CSS snippets here
User avatar
Strayer
Bear Rating Trainee
Bear Rating Trainee
Posts: 5
Joined: 13 May 2013, 02:11

Yet another favicon unread counter

Postby Strayer » 04 Dec 2016, 20:24

I decided to build a pure JS plugin for TT-RSS for fun and have been using it since quite a while, maybe someone else has a use for this. It adds a simple badge counter to the favicon every time the unread items count changes.

Image

The source code and released versions are available on GitHub. The newest version is 1.1.0.

To install the plugin, simply download the newest release, unzip it to your plugins folder and activate the plugin in your users settings.

As a side note: There already is another plugin mentioned in these forums that does the same thing – the difference is only in the implementation… the linked plugin checks the title for the unread count every second, my plugin uses the MutationObserver API to update the badge only if the title of the tab actually changes. I personally think my plugin is a cleaner and better implementation because of this, but MutationObserver is only available IE10+ (and all other modern browsers).

iophobia
Bear Rating Trainee
Bear Rating Trainee
Posts: 3
Joined: 09 Nov 2015, 13:42

Re: Yet another favicon unread counter

Postby iophobia » 09 Jan 2017, 22:24

Just wanted to say thanks. Working great. Was using favicon_badge previously that kept me from updating my install as it was always carshing ttrss. With this one, there's no problem.

And what's even better: The readability of 3digit-unread counts is way better. Plus I decided to go for a #200 instead of the glaring #d00 for better contrast.

User avatar
Strayer
Bear Rating Trainee
Bear Rating Trainee
Posts: 5
Joined: 13 May 2013, 02:11

Re: Yet another favicon unread counter

Postby Strayer » 12 Jan 2017, 18:45

Thanks for reporting back! I'm happy its of use for you!

I was already thinking about adding some options to the plugin to configure the badge, but always stopped thinking about it because its so perfectly simple right now… no configuration, no database dependencies… just plug it in and done ;)


Return to “Themes and plugins”

Who is online

Users browsing this forum: No registered users and 2 guests