Discourse Chrome Extension to show unread count

Hi folks,
my friend Alessandro has just made this extremely useful extension for our community
https://chrome.google.com/webstore/detail/nethserver-community/afieionhihmhhfclpkcpcblmjafcegid

Displays the number of unread notifications of your Discourse account, same notifications of Discourse balloon also with tab closed
You can also click the icon to open the Discourse site.
He can shortly work on it and made a generic customizable extension on your Discourse installation
Do you like it?

4 Likes

Could you share some screenshot?

Do you think its features conflict with this one

https://meta.discourse.org/t/show-desktop-notifications-when-available/10183

You can also check this one: Vamist - Cửa hàng Chrome trực tuyến It’s a bit more advanced (it displays latests posts as well). It’s made by one of my community members and this too can be refactored to be used as a general Discourse extension. There is also a Firefox version here: https://addons.mozilla.org/en-US/firefox/addon/vamist/

1 Like

It’s very simple, take a look at the link above :smile:

1 Like

No it does not conflict with desktop notification, because as @alefattorini said, it shows only the number of notifications. I had thought to implement desktop notifications in a future version, when I did know your work on it. Probably it could be useful only when the tab is closed, to not show duplicated notifications.

I think this is pretty cool, and might be an interesting thing to add to my community. You say that your friend is going to do more work on this, any chance he could open source it?

Sure, here is the code https://github.com/alepolidori/chrome-discourse and here the extension.

6 Likes

Just installed :smiley: pretty cool!!!

1 Like

That’s pretty cool.

Thank you!

Now, for mobile notifications then it’s set :smiley:

1 Like

I would evolve the extension to support multiple “discourse sites” at the same time, for example http://discourse.ubuntu.com/ and https://meta.discourse.org/.

I would like to make it with a popup dialog showed clicking the icon.
The dialog shows notification list of all added discourse sites.

What do you think ?

1 Like

This extension is polling us WAY to aggressively.

I am noticing about 1.5 hours of processing time from your account in the last 24 hours (@alep), hitting /latest OVER and OVER again.

My estimate is that this is hitting /latest every 10 seconds, its not even sending a user agent so we can not easily ban this.

Recommend you pull this extension and reimplement using the message bus, it can notify you when new stuff is available.

4 Likes

Sorry for the mistake @sam, the counter and update methods were raw… I’ve reimplemented the extension to use MessageBus. It does only an initial json request to session/current.json to obtain che current user id (the response it’s about 1.5 KB) to use with MessageBus.subscribe /notification/userId (each response with data is about 800 B in my case). I’ve not found another method: exists ? You can verify the code here.
Is the cpu load fixed ?
Is there some documentation about subscriptions that can be done in MessageBus ?

2 Likes

Now the extension v0.2 shows notifications list with a popup clicking the icon: here some info.
@sam is available the documentation about rest api ? How is it going with the processing time ?

1 Like

absolutely good for our Discourse community, now we need more feature :smile:

3 Likes

Please ask here or add new issues there:
https://github.com/alepolidori/chrome-discourse-notifications/issues

2 Likes