ElkArte Community

Extending Elk => Addons => Topic started by: emanuele on April 03, 2015, 04:34:18 pm

Title: [ADDON][BETA] Favicon with Notifications
Post by: emanuele on April 03, 2015, 04:34:18 pm
To make @meetdilip happy, here it is a first beta of an addon that adds the number of notifications to the favicon of your browser. :)

Completely untested the installer, apart from that the addon is pretty basic, and shoud Just WorkTM... as usual! xD

I used this pre-made js library:
https://github.com/ejci/favico.js
it's not as flexible as I wanted at the beginning[1], but for now will do.

As soon as I set up a github repo I'll post it to the addons site. ;D
I would like to be able to add two notifications at once: one for mention/alerts and one for PMs, but with that library I can add only one number at a time... well, less code to write. :P
Title: Re: [ADDON][BETA] Favicon with Notifications
Post by: Bloc on April 03, 2015, 05:00:33 pm
Neat idea lol..but won't it be tough if there are more than 9 notices? AFAIK the favicon is 16x16 image...not alot to put something else into.

Strike that, I read on the favicon specs that they can be bigger actually. But still, on my chrome tabs they are miniscule things...
Title: Re: [ADDON][BETA] Favicon with Notifications
Post by: emanuele on April 03, 2015, 05:47:54 pm
I guess so, in such a tiny space you can't put much...
I think mobile devices use different favicon sizes but probably not for the tabs, but for bookmarks and/or other stuff like that, so probably not "affected" but this trick.
Title: Re: [ADDON][BETA] Favicon with Notifications
Post by: Spuds on April 03, 2015, 05:59:19 pm
Fun :D Its actually easier to read when there are double digit values, at least on the demo page.

What is included in the notification totals?  (sure I could look at the code, but you know :P )

Title: Re: [ADDON][BETA] Favicon with Notifications
Post by: emanuele on April 03, 2015, 06:13:23 pm
The number next to the mentions menu. :P
Title: Re: [ADDON][BETA] Favicon with Notifications
Post by: radu81 on April 03, 2015, 06:19:16 pm
it's a good start ;) I'm pretty sure I'll use it when notifications will be more complete ;) I know you have some plans for 1.1 or next version
Title: Re: [ADDON][BETA] Favicon with Notifications
Post by: ahrasis on April 03, 2015, 10:50:57 pm
Hey... This is a nice addon. Thumbs up.

But I haven't started on android app notification yet.
Title: Re: [ADDON][BETA] Favicon with Notifications
Post by: meetdilip on April 04, 2015, 08:58:31 am
You know, you guys are simply awesome :love:
Title: Re: [ADDON][BETA] Favicon with Notifications
Post by: emanuele on July 23, 2015, 10:22:22 am
I'm working a little bit to add that one to 1.1, with an additional ajax call to keep it up to date.
Objections? O:-)
Title: Re: [ADDON][BETA] Favicon with Notifications
Post by: radu81 on July 23, 2015, 11:43:15 am
no objections, I only hope it will not be hungry in hosting resources ;)
Title: Re: [ADDON][BETA] Favicon with Notifications
Post by: emanuele on July 23, 2015, 12:33:21 pm
I added a probing at 10 seconds (hard-coded, no interface to change it), if this kills a server... then the server is already dead to begin with. ;D
Title: Re: [ADDON][BETA] Favicon with Notifications
Post by: emanuele on July 26, 2015, 01:19:51 pm
While I was at it I shoved in also the desktop notifications (just fancy stuff :P).
Title: Re: [ADDON][BETA] Favicon with Notifications
Post by: emanuele on July 26, 2015, 03:10:30 pm
I'm done with it! https://github.com/elkarte/Elkarte/pull/2156
One less addon to support! :P
Title: Re: [ADDON][BETA] Favicon with Notifications
Post by: Spuds on July 27, 2015, 06:57:44 am
QuoteOne less addon to support!
Brilliant !!!

/me runs to put Elk on a feeding frenzy :P
Title: Re: [ADDON][BETA] Favicon with Notifications
Post by: emanuele on July 27, 2015, 07:15:53 am
LOL
Title: Re: [ADDON][BETA] Favicon with Notifications
Post by: Flavio93Zena on July 27, 2015, 03:16:35 pm
Still... I'd say put a checkbox to deactivate it in case someone doesn't want it.