MMMeeja

blog :: firefox

TwitterFox Preferences In Depth

Posted on 31 Jul 2008 by Andy

I’ve said before that TwitterFox is my Twitter client of choice because I spend most of the day working in my browser. Despite its awesomeness, I think TwitterFox could be improved with better documentation than provided here, so I’ve compiled an in depth look at the TwitterFox settings.

Twitterfox context menu

Most of you should know that you can right-click on the TwitterFox icon (at the bottom-right of the Firefox window) to see a menu offering a number of options. Most should be self-explanatory so we’ll be concentrating on the dialog that pops up if you choose “Preferences”

Twitterfox preferences window

Accounts

At the top of the dialog is a section that allows you to configure which Twitter accounts you want to use with TwitterFox - did you know you can use more than one? It’s a great feature for Twitter application developers that need multiple accounts for testing.

Below the accounts section, we get to the meat of the preferences.

Preferences

First up, the “Get Tweets” combo allows you to specify how often you want the extension to poll Twitter to check for new tweets. If you see the red T icon, hover over it and check the tooltip message. If the message says “Rate limit exceeded” then you can use the “Get Tweets” combo to reduce the polling rate. Twitter vary the number of calls per hour to manage load on their servers, so I use this setting quite often.

Next, comes the “Popup Interval” which determines how long the temporary window showing the latest tweets will display for. If you are a slow reader follow verbose people, you’ll want to show the popup for longer.

Keyboard shortcuts for TwitterFox can be changed with the next couple of preferences. Note that the defaults (Ctrl+Shift+L, Ctrl+Shift+P) clash with another Firefox extension, Firebug, so if you have both installed and you’re a keyboard demon, you’ll want to change these.

A load of checkboxes next...

Popup Display

This determines whether the little window will show when a new tweet is received. I have this turned off since I find it easier to deal with tweets in a batch. Note to the TwitterFox developers: if Popup Display is unchecked, disable the Popup Interval combo.

Window Display

Uncheck this now!

You know when you read a list of twenty new tweets and one about halfway down has an interesting link, so you click it and TwitterFox closes, marking all those tweets as read? Annoying, isn’t it?

Unchecking the “Window Display” checkbox stops TwitterFox from closing.

Cookie

Overwriting the browser cookie is usually a good thing, unless (like I mentioned above) you’re testing a Twitter application with multiple accounts. For most people, this preference shouldn’t matter.

Notification Sound

You can get TwitterFox to make an annoying noise when new tweets are received. It would annoy me so I shall speak no more of it.

Bonus Tip

I can’t believe that more people don’t realise this, but clicking the link symbol in the TwitterFox window (next to the “Recent” tab) adds the URL from your current tab to any tweet you are about to send. Very helpful.

0 comments, add yours.

Google Browser Sync To Be Discontinued

Posted on 15 Jun 2008 by Andy

I only learned of Google’ Browser Sync today, when the notice that it was to be discontinued was posted and I must say that I am disappointed, its functionality would have been welcomed by lots of Firefox add-on developers if only Google could have promoted it and made the service more accessible.

Photo by KRHamm

An API available to other plug-in developers could have really taken off if it would allow synchronising arbitrary data across browsers. I have five computers in my home and access to countless more at work, each of which runs Firefox but I can never quite get the same extensions installed on them all, let alone have the preferences set identically. Now that really would be a killer app!

All is not lost because it looks like Mozila Weave is about to release an update that will replace all of the functionality lost to the demise of Browser Sync. The roadmap also contains plans for preference synchronisation too.

This looks like a great opportunity for the team behind Mozilla Weave, I know that being able to synchronise preferences across browsers would help out the GTDInbox developers no end.


Creative Commons licensed photo by KRHamm.

0 comments, add yours.

My Experiences Making The GTDel.icio.us Firefox Extension

Posted on 17 Feb 2008 by Andy

I was inspired by Andy Mitchell’s superb GTDInbox, an extension that I’ve been using for a while now, to write my own Firefox extension.

As good as GTDInbox is, I still found myself using del.icio.us to maintain lists of items to do, web pages to read and software to install. With this in mind I decided to create a Firefox extension that would give me the same functionality for del.icio.us as GTDInbox adds to GMail.

Having read up about the del.icio.us API, it was time to get to work making my first Firefox extension...

Excellent Resources For Extension Newbies

Fortunately, I found a superb lifehacker article which started me off in the right direction.

Although it is always tempting to dive straight in to a project like this, I followed their advice to create a separate profile for development work. It takes about five minutes and provides a sandbox to keep my new extension away from my normal profile. Well worth the effort.

Next step is to create a whole bunch of files and folders for your extension, but luckily Ted Mielczarek has created a extension wizard which saves time here.

Next task was to configure firefox to read my extension from a directory of my choosing instead of a JAR file. Following the instructions from Mozilla Developer Connection made this easy. Now to test out my first extension skeleton.

First Test

I restarted Firefox with my developer profile and there was little sign of my extension!

After a bit of digging I noticed that the Tools menu had a new item labelled “Your localized menuitem”. Clicking that brought up the Hello World box I was expecting. I could also add a new button to my toolbar - I must make that automatic in the released version.

So, the basics are working - now to go to XUL school!

Designing The Extension

I want a dialog to pop up when a user clicks a button on the Firefox toolbar. The dialog will display all of the user’s existing GTD tags and give the option to create new ones. The user can select tags also add notes. Pressing OK on the dialog will cause the page to be bookmarked with the relevant tags.

If the page is already bookmarked by the user, the set of applied tags is automatically selected and the notes field is populated.

This functionality requires that the extension contacts del.icio.us to retrieve the set of GTD tags created by the user and also to add and update bookamrks. This will be done using an XmlHttpRequest.

The extension wizard created a preferences window for me, but I need to add another window for the popup. Read the tutorials at XUL Planet helped a lot but I found that using XML to create a user interface was often a case of trial and error - &dquo;Udefined Entity&dquo; is not a sensible error message.

Coding

XUL is pretty easy to pick up if you have experience of XML and XSD. Some of the layout is not obvious, but it becomes clear after a few experiments.

The Javascript is also straightforward, with the only oddities being that you must interrogate the environment for handles to access Firefox’s preferences or an XmlHttpRequest (COM developers will be at ease with this). I soon added convenience functions to read and write preference data, output debugging information to the console and pop up simple dialogs.

I found localization a bit less intuitive. The wizard starts you off well, but I became confused as to which file should contain the localized strings - there is a DTD and properties file and both could be appropriate. Generally, the properties file is the place for these things but unfortunately one must restart Firefox to register any changes. The Extension Developer add-in has an option to reload all chrome but Firefox usually crashes soon after choosing that.

I figured that using javascript libraries (like prototype.js or JQuery would get me nothing but pain on planet XUL, so that meant that I had to hunt down snippets of code library routines that I take for granted (getElementsByClassName(), I’m looking at you).

Design Tweaks

After playing around with my first prototype, I decided a number of changes had to be made...

One area that I overlooked in my initial design was storing passwords - at first I had them stored with the user’s preferences, which would not do at all, especially in plain text! Luckily there were some good examples available on the net so now they are under the control of the Firefox password manager.

Another change was to store GTD tags locally, instead of interrogating the del.icio.us web service every time the plug-in was displayed. It means that the window opens over a second quicker on my ancient laptop.

Summing Up

The extension is starting to come together but there is a load of work still to come - namely testing and prettifying it.

It has been an enjoyable project - new technologies to get my teeth into and working with only one browser makes a refreshing change. I hope to produce some more extensions in the future.

Getting Things Del.icio.us is not quite ready for the public at large yet, but watch this space for the next couple of weeks.

0 comments, add yours.

 

Sitemap

Copyright © 2006-2008 MMMeeja Ltd. All rights reserved.