59

I noticed that chat supports desktop notifications to notify you when someone pings you, which made me think that maybe the main site has this functionality as well, and I'd really like to use it in that case. But I couldn't find an option to turn them on anywhere.

Chrome notifications look like this:

example for chrome desktop notification

3
  • I have ported the extension to a Firefox add-on as well. Mind if I change your title/tags to be more generic?
    – Rob W
    Commented Dec 10, 2012 at 15:00
  • No problem. I'm responding immediately because I got notified by your extension. Thanks again! :)
    – sashoalm
    Commented Dec 10, 2012 at 15:02
  • 1
    Is there any reason why this features isn't implemented on stackoverflow website yet? I really would be happy If I knew it.
    – Abraham
    Commented Nov 28, 2021 at 12:34

2 Answers 2

42

I started writing an implementation using the Stack Exchange API, but noticed that the API is too slow because of cached results. So, I took another path:

I've created a Chrome extension which uses Web Sockets to get real-time notifications. These notifications are then displayed in a desktop notification.
10 dec 2012: I have ported the Chrome extension to a Firefox add-on!

Example:

1 unread messages in your inbox

26
  • 1
    @satuon I just uploaded it: chrome.google.com/webstore/detail/…
    – Rob W
    Commented Nov 18, 2012 at 23:21
  • 1
    To-do for myself, create Stack Apps listing.
    – Rob W
    Commented Nov 18, 2012 at 23:25
  • 14
    Ironically categorized in 'productivity', I love it!
    – user50049
    Commented Nov 19, 2012 at 2:20
  • @RobW When I installed it, it said "No user ID found. Want to configure Desktop Notifications for the Stack Exchange?", I clicked OK, but nothing happened. Also, Chrome didn't say what privileges/access the extension required, which was strange.
    – sashoalm
    Commented Nov 19, 2012 at 7:42
  • @satuon Have you tried the latest version from the Chrome Web Store?
    – Rob W
    Commented Nov 19, 2012 at 13:07
  • Yes, I was trying that when I got the error. I also get this message if I disable and then enable the extension.
    – sashoalm
    Commented Nov 19, 2012 at 13:26
  • @satuon I mean the latest version. I fixed some bugs and improved the UI since I posted this answer.
    – Rob W
    Commented Nov 19, 2012 at 14:17
  • OK, this time it asked for permissions, and it gave me a settings form where I filled my user ID. Is that the only thing needed? It didn't ask me for password or anything about Open ID.
    – sashoalm
    Commented Nov 19, 2012 at 15:23
  • @satuon That's correct. There's no authentication involved, because I'm using Web sockets. The extension subscribes to the <userid>-inbox event, and will immediately get notified when your notification count changes.
    – Rob W
    Commented Nov 19, 2012 at 15:26
  • Thanks, now I'm waiting to see the first notification :) Btw, why does it need this permission 'Your tabs and browsing activity'? Is it because it's needed for the desktop notifications?
    – sashoalm
    Commented Nov 19, 2012 at 16:27
  • @satuon No, it's only needed for focusing windows (after clicking on the notification to open it) and ensuring that there's only one options page open. To see the use of the tabs permission, look in the source code and search for chrome.windows and chrome.tabs.
    – Rob W
    Commented Nov 19, 2012 at 16:30
  • @TimPost Response to your question in the Chrome Web store: Are you looking for an option to stop the extension? There's a stop button at the Options page.
    – Rob W
    Commented Nov 19, 2012 at 17:16
  • @RobW Not really. I'm looking to limit alerts to only certain types of messages (mostly, if a user replies to a private moderator message) so that I don't have to keep checking the site after sending one. Those subjects can be matched easily with a regular expression, so perhaps allow a "only show this" / "never show this" (selectable) option that takes a regular expression for the setting? Ping me once you've announced it on Stackapps and I'll convert this comment to a more proper feature idea.
    – user50049
    Commented Nov 20, 2012 at 0:53
  • @TimPost I've posted it on Stack Apps already, link is in the answer above.
    – Rob W
    Commented Nov 20, 2012 at 8:47
  • Is it possible for the extension to check if a tab with stackoverflow.com is already open and switch to it in that case instead of opening a new one?
    – sashoalm
    Commented Nov 24, 2012 at 11:31
2

I want this feature as well.

An "easy" way of getting this functionality is to create a Chrome extension and use the Stack Exchange API. Some relevant docs:

Nathan Osman (known as George Edison) has already posted an extension for showing inbox messages in a browser action popup - See Stack Alert on Stack Apps (source code on Github).
A few months ago, I suggested to support desktop notifications, but it has not been implemented yet.

So, someone with time and knowledge, please stand up and create this extension :)

1

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .