Something Chrome Needs
There is a very common type of extension for Google Chrome, and that happens to be the “Notifier” type.
You have GMail Notifiers, Google Voice Notifiers, Google Reader, Google Docs, OWA, Facebook, Twitter, etc etc. Wouldn’t it be nice if Google Chrome just had a single Notification Center with a fantastic User Interface for showing notifications from whatever services register themselves with it?
I think it would, and over the summer – if I have spare time – I think I’m going to program an extension that will can accept additions for showing notifications. I’ll then ask around for help and/or program some basic services for it to use, and post it to the Chrome WebApp Store.
My next questions are:
- Would you use this? Is it a good idea?
- Would you code for this?
- Would you purchase this for $1?
At the moment, I’ve got plenty of cool programming projects, and I’m not making money with any of them. GVOMS is almost entirely free (no companies have purchased a license to use), and anything else I’ve done so far has been free and open source.
So unless people are going to start donating to me – which I’m pretty sure you aren’t – I need to find some way to make money. I’m a college student, after all.
And I don’t think $1 would be too much to ask for a unified notification center in Google Chrome, do you?
Making More Natural Desktop Notifications in Chrome
Do you have a website or application that uses Google Chrome Desktop Notifications? Well, let me just share with you this very simple snippit of code that will make their interaction a lot more natural.
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <style> html * { font-family: sans-serif; } h1 { padding: 0; margin: 0; font-size: 12pt; font-weight: bold; } body { font-size: 10pt; } </style> <script> function changeLinks() { for(var i = 0;i < document.getElementsByTagName("a").length;i++) { ele = document.getElementsByTagName("a")[i]; ele.target = "_blank"; } } function detectClick(e) { var rightclick; if (!e) { var e = window.event; } if (e.which) { rightclick = (e.which == 3); } else if (e.button) { rightclick = (e.button == 2); } if (rightclick) { self.close(); } } </script> </head> <body onload="document.timeout = setTimeout(self.close,5000);changeLinks();" onmouseover="clearTimeout(document.timeout);" onmouseout="document.timeout = setTimeout(self.close,5000);" onmouseup="detectClick();"> <a style="display:block;cursor:normal;padding:0;margin:0;color:black;text-decoration:none;" onclick="self.close();" href="/link/" target="_blank"> <h1>Title</h1> <span>Message</span> </a> </body></html>
Thats really all there is to it. Lives on a 5 second time. If you hover over it, it stays longer, if you right click it it closes. If you click it it goes to /link/. Quite nifty, if I do say so myself.
Its slightly buggy regarding links in the message.. but meh.
Webkit JavaScript Notifications API
Something I learned about recently by following the updates being issued to Chrome, is that with today’s release they also pushed out the Webkit Notifications API to Chrome Stable (v4). Surprisingly, this is actually the first I’ve heard of it’s existence. I took a look and played around with it a bit, and it is qué cool.
Visit my Sandbox to see the code in action, or continue reading for some code excerpts.


