Discourse Chrome Extension to show unread count

(Alessio Fattorini) #1

Hi folks,
my friend Alessandro has just made this extremely useful extension for our community

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?

Google Chrome extension for discourse notifications
(Lê Trần Đạt) #2

Could you share some screenshot?

Do you think its features conflict with this one

(Stefan) #3

You can also check this one: Vamist - Chrome Web Store 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: Vamist – Add-ons for Firefox

(Alessio Fattorini) #4

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

(Alessandro) #5

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.

(Thomas Purchas) #6

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?

(Alessandro) #7

Sure, here is the code GitHub - alepolidori/chrome-discourse-notifications: Chrome extension for Discourse communities notifications and here the extension.

(Alessio Fattorini) #9

Just installed :smiley: pretty cool!!!

(Michele) #10

That’s pretty cool.

Thank you!

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

(Alessandro) #11

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 ?

(Sam Saffron) #12

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.

Google Chrome extension for discourse notifications
(Alessandro) #15

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 ?

Chrome extension Discourse v0.2
(Alessandro) #16

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 ?

(David H Ng) #17

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

(Alessio Fattorini) #18

Please ask here or add new issues there: