Chrome extension for discourse is at v0.2: thanks to djfarrelly collaboration, it shows notification list with a popup ! You can install it from here
Nice! I don’t suppose it’d be possible to make it distinguish between ordinary notifications and private message notifications? (i.e. blue vs green notifications). Or alternatively set it to only show PM notifications.
Thing is, I don’t want to be distracted every time I receive a like or there’s activity in a topic I follow, but if there’s a PM waiting for a reply from me, that deserves my attention.
Edit: I suggest renaming the app to “Discourse Notifications”
Errrrm , you may need to rethink the name. “Discourse” is already taken
Not now, but sure, I already thought about it and I think that it can be useful.
My idea is to choose the activation in the option page with a checkbox
Thank you for the reporting and any feedback is welcome
Agreed please change the name to Discourse notifications, or something like that.
Done. I’ve changed the name using your advice “Discourse Notifications”, see here.
Are there any problems with the icon ? and with github repo name ?
The rule to follow is
“Will anyone confuse my software with an officially built piece of software”
@alep, a really nice and tiny thing!
A few propositions
-
It would be nice if we could authorize the plugin to multiple Discourse instances!
-
Once authorized, it would either show a few icons in the Chrome toolbar OR show the summary of new notifications and then detailed per-item list once you click the icon.
-
Instead of showing the default Discource icon, show the icon of the setup the plugin is logged in.
-
Multi-site support is on my todo list ;), but now I’m going to add it to features list on github.
I thought to implement it showing each notifications group with an accordion menu. -
I don’t know if one single chrome extension can shows multiple icons on the toolbar, I will investigate.
-
Good idea !
Thanks for all the feedback !
What about some sharing capabilities? Something like share this page to Discourse which will post a link to.
You should request the “data on all sites” permission and automatically add sites you visit when window.Discourse
exists and window.Discourse.User.current()
is truthy. Don’t poll /notifications?silent=true
- use the message bus instead. You’ll need to handle the case when the message bus position gets reset.
Also, how about “Notifications for Discourse” for the title?
Can be the following a valid example ?
I am on the url www.example.com, right click on the page and the contextual menù has the “share with discourse site” item. Clicking it will open the page to create a new post with a preformatted page link.
Other than right click could be a semi transparent icon always present in the bottom right corner of the page or in the chrome omnibox or with a new menu item clicking the extension icon.
I think that only the user can add a site in the future multi-site support feature.
If the extension automatically add sites, I think it could be annoying. Eventually an option could be present to enable the extension to propose a list of the visited discourse site and the user can finally choose to activate them.
Don’t poll /notifications?silent=true - use the message bus instead.
The extension already using MessageBus.
/notifications?silent=true is used only on boot to get the user id. It is the only method I have discovered to get the user id as I explained in this post , because I did not found the documentation. I’ve asked about it. It exists ?
Also, how about “Notifications for Discourse” for the title?
I’ve changed the title as suggested by @codinghorror.
AFAIK these 3 are equivalent, maybe you could use one?
Discourse.User.currentProp("id");
Discourse.User.current().get("id");
Discourse.User.current().id;
The last one will fail on certain browsers or if an observer is set up on it.
Thank you for the advice, but I think that it may not be possible:
Discourse object is present in the discourse site environment, but the chrome extension has its own environment where Discourse object does not exist.
Well, just collect the user ID during site detection then and sendMessage() to the extension page or send it over some other way.