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.
Dear Chrome: What the Hell is This?
I love that you finally added previews for each of your tabs, that amazing Windows 7 feature that all of your competitors adopted before you…
But what the light is this? Why on earth are there this mini-windows, and why are the preview windows themselves so faded out? Not to mention it doesn’t even WORK when you have Chrome minimized…
I love you Chrome, but you need to fix these in the next dev release. NEED.
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.
Hunting Down the Bugs – TwCLI on Chrome for Linux Beta
This is the first post of a new series, looking at some of the odder bugs encountered while developing for the expanding Web, no matter how basic a bug it may be.
Thanks to twitter user @paperfairy, a bug was discovered on my Command Line Twitter Client, TwCLI.
For some reason, when submitting a command in Chrome for Linux, the page would simply refresh, and the command would never be sent. At first, I had no possible way to track down this bug. I didn’t have a linux box (with a GUI, anyway) so I simply told him that it was unfortunate, but it’d have to stay a bug. Until a recent post on lifehacker brought my attention to Portable Ubuntu. I immediately installed it, opened up the Chrome website in Firiefox, installed Chrome Beta, and headed over to TwCLI to see what was amiss.
Of course, it was a single line in a detection script to send Geo-Data to Twitter (as long as the user approved it, of course):
else if(google.gears) {
This single line was throwing an exception I hadn’t encountered in other browsers – Google wasn’t defined. Oddly, I thought it would handle that properly, since google wasn’t defined, it would just skip over it, but instead it threw an error and halted all further javascript code.
The fix was simpler than tracking down the bug, I simply had to add this to the start of the javascript code:
try{ if(!google) { google = 0; } } catch(err) { google = 0; }
And voila, I had both a check for google, and a catch if it decided to throw errors while checking for it.
Whether this is a Chrome bug or not, I don’t know – I simply don’t know enough about JavaScript in order to say so either way. But, are undefined variables supposed to throw errors, or are they simply supposed to return false?



