There's Scout in my Safari

June 09 Bullet_white By Andre Bullet_white Comments Comments

The smart folks over at Rails Machine are always quick on the draw. Still, we were impressed when developers Will Farrington and Mike Skalnik had a working Safari 5 extension for Scout within 24 hours after Safari 5 extensions were announced. I pinged Will for the scoop:

What does the Scout extension do?

The extension works in the background to update the toolbar icon with a badge indicating the number of active alerts on Scout. Additionally, if you click on the toolbar icon, it will open up the activities page on Scout.

Active Scout alerts will show a badge:

... which you can then see on your Scout account:

Tell me about building a Safari 5 extension.

Building the extension itself was pretty pleasant. The bulk of it was spent in writing the (asynchronous) cross-site AJAX requests; the actual integration with Safari's Extension APIs was really simple and well-documented.

Overall, the extension APIs are still pretty young, and that does show, but very well-designed too. It ended up clocking it in at just over 100 lines of JavaScript (including comments and my whitespace preferences). The Extension Builder itself is very easy to use when it comes to setting up the extension and building/signing it. I can't speak to how this compares to the development process for Chrome or Firefox, but I'm very happy with the experience I've had and I'm looking forward to seeing what new APIs they end up adding to Safari Extensions.

What are your future plans for the project?

Version 0.2 will probably be out in the next day or two with some minor improvements to various things. I definitely have some itches I want to scratch. The big one for me — which might not be possible with the current APIs without some hacks — is getting a drop-down menu working for the toolbar icon so users will be able to right-click and have access to a quick list of all those active alerts they can use to navigate right to individual alerts. Beyond that, my other goals are working on a better UX; stuff like a first-run alert letting the user know they need to enter account information and offering a nice way to do so without necessarily having to even open up the Preferences window.

The code is open source on GitHub and I certainly welcome contributions: all you need is some JavaScript knowledge and to take a gander at Apple's documentation for the Safari Extension APIs.

Well done, Will! We'll be keeping our eye on the project. Check it out for yourself here.

Get notified of new posts.

Once a month, we'll deliver a finely-curated selection of optimization tips to your inbox.

Comments

comments powered by Disqus