30 Jun 2008

How To: Writing a Firefox plugin (better known as add-on)

Use Firefox and love to code? Here's a tutorial on writing your own Firefox extension from Roachfied.com - the same guy who wrote the firefox extension for bugmenot.com, amongst the others.

Note that plugins are more correctly called Extensions or add-ons. According to this page on Mozilla developer center:
Extensions are different from plugins, which help the browser display specific content like playing multimedia files. Extensions are also different from search plugins, which plug additional search engines in the search bar..
If you end up writing a gem, dont forget to enter it into Mozilla's extension competition - Extend Firefox 3! This is now closed, here are the results.

Interestingly, For GreaseMonkey fans or users, there's also the possibility of tinkering with the interfaces of the Google services (Eg. Google mail) using Google's Experimental GreaseMonkey API. This allows you to literally re-organize the service as you see it. Another reason to just love Google! The best part of this arrangement is that all it uses the Javascript syntax and is written in a text file (.JS) using your favourite editor, making it a breeze to prototype and even maintain. Here's a example script to give you the general idea.

If you come up with some interesting scripts or add-ons, dont forget to post a link as comments. I am sure me and other readers will enjoy, both, looking through and using them :-)

See also:
Image credits: roachfiend.com

28 Jun 2008

Give your Google RSS sidebar the "for iPhone" look

Here's a quick hack to give your RSS sidebar the "for iPhone" version look. Replace the url for standard mobile devices with this newly release version (announcement) for the iPhone and see the difference!

(Click to enlarge)

Writing offline applications with Firefox 3.0

One of the major features of the newly released Firefox 3 is the support for offline applications (implemented as part of it's implementation of HMTL 5). For web developers this means that their users can continue to work on a application even when they are not connected to the internet.

Before Firefox 3, this was already possible using Google gears. Even today a ever increasing number of Google applications like Google reader, Google Docs and non-google ones like Zoho Writer, etc are already using this to provide offline support. With its current release Firefox makes this add-on redundant.

Meanwhile, for web developers who want to give this a try, here'sthe article from IBM developerworks that tells you how - Get Ready for Firefox 3.0. For those who are eager to see a working demo, check out the one on the article author's blog.

Links

27 Jun 2008

Ubuntu targets MID field

Ubuntu, the hugely popular distribution (what's a distribution?) of Linux, is most commonly seen and used as a desktop. It does have a strong server edition. The new Ubuntu MID edition now targets the new market of internet enabled Mobile devices (MID = Mobile Internet Devices).

Produced by the Ubuntu Mobile and embedded community, the idea is to promote the use of Linux on mobile devices that are getting popular everyday. Sale trends are already showing that more of us are using internet enabled mobile devices everyday. Such devices are rapidly adding newer capabilities to their portfolio. Gone are the days when the idea of a mobile device was pretty much a fancy phone with camera and some colorful icons. Today these devices are getting smaller, cover a large variety of uses. GPS, MP3 player and Web Browsing are just a few examples of such uses.

So far the OS for these devices has pretty much been a closed-source or proprietary affair. There have been a few attempts at porting linux to specific mobile devices (see: Linux for devices), but nothing mainstream. Ubuntu hopes to be able to change that with Ubuntu MID edition. At present this effort is sponsored by Ubuntu and Intel.

In addition, Ubuntu MID holds the promise of extend todays desktop user experience (Flash, Ajax, etc) and internet applications like social networking, video sites, blogging, etc.

I for one am a bit vexed at not being able to try this out at once. I usually use a virtual machine to do this. Sighh .. they dont have one for MIDs. Well, not that i know of (let me know if you do..).

Links:

25 Jun 2008

Popups Eliminated!

Some readers have recently reported popups (or popunders) when they navigate to any of my blogs. It seems one of the web analytics trackers I use had changed their terms-of-use so as to start including advertising. This has now been taken care of! My apologies for the inconvenience and thanks for those who wrote in to bring this to my notice.

So why did i not notice this myself? No no .. I do read my own blogs every now and then (i particularly enjoy reading my older posts) ;-) But it's that I have been using Firefox (which, for one comes with a built-in popup blocker) with the Adblockplus add-on installed. This plugin does such a neat job of blocking ads, popups, etc that I've never had to see any - even those on my own site. Not surprisingly, readers who reported this use Microsoft Internet Explorer. Although the latest versions do offer a certain level of popup blocking, it is far from perfect. To such readers, I highly advise switching to Firefox.

To see the real difference try browsing to this website (The TOI is a major Indian newspaper). Hold on! Note that their website is full of advertisements and quite a few popups. Navigating to the website opened 3 new windows in the front and 1 more behind (see screenshot on the right - using Microsoft Internet Explorer v6.0).

If you are already using Firefox then it should have already blocked the popups. But you should still continue to see advertisements that include static images as well and flash-based animations.

Now install the Adblockplus add-on (requires browser restart). I feel there is a little explanation required here. As said before, this nifty little add-on does a great job of blocking ads, banners, annoying flash animations (only the unwanted ones), etc. It comes with a set of existing filters - think of these as rules that tell Adblockplus what to and what not to block.

The add-on makers continuously improve these filters and keep adding more to cover new advertising websites and keep up with changes to existing ones. Such "filter lists" are available online (Eg. Easylist). Adblockplus can "subscribe" to one or more list of these improvements i.e. look for and download new ones whenever they are available. This way it always remains on top of things!

So, the first time your Firefox restarts after installing Adblockplus, it will prompt you to select one of many such lists. I usually select the first entry - named "Easylist (USA)". This will have to be done only once. From then on it will automatically continue to download updates to this list.

Next, try browsing to TOI again. The screenshot (Firefox v3) on the left shows the same website . You may note that not a single advertisement is visible!

And for those advertisement that still manage to come through, you can tackle those personally by simply right clicking on one of them and select "Adblock Image...". It's as simple as that! People with techie background can quickly get a hang of of doing this and can easily add their own to cover things like scripts (*.js), iframes, etc wherever easylist has missed them :) For those willing to learn, here's a useful link.

I stress again that legitimate popups and images are rarely blocked (never in my experience). And in case you want to disable adblockplus for a particular site or a while, here's how.

All in all, I highly recommend that you install this plugin and sharing this info with your friends, relatives and loved ones :) Happy browsing!

Links:

18 Jun 2008

Here's Firefox 3

After having cribbed my guts out about the missing Firefox upgrade (see: Where's Firefox 3?), i guess i needed to type this post to balance things out.

I guess i was a bit peeved about having been promised a major upgrade plus participating in setting a world record and then simply let down. But having used the upgrade for about a day now, I think i am happy with what I've got. Here are a quick few notes on what's changed for me (both good and bad):

  • It seems to be smoother on my system resources (great!). I actually have a old machine that FFv2 was literally choking the life out of. But now it's living happily there :)
  • I find the fact that it rifles through my favorites as i type something in my address bar to be a bit distracting (not bad), but I am going to go with it for the moment. I can see how it can be useful.
  • Most of the add-ons that I felt were a must, were compatible with FF3 (great!). The only two I am really waiting to catch-up are PDF download and the bookmark duplicate detector.
  • My favorite themes (Ubuntu Human and Ubuntu Tango) are not compatible (not that bad) with the latest version. I am hoping they catch on soon
  • I am happy with most GUI improvements (good). Especially the ones to the options box, add-ons box, etc.
  • One of the worst peeves with the bookmark management in v2 was that when I right-click on a folder and choose to create a new folder. FF2 created the new folder at the same level as the one I right clicked on (why!!). I had to drag and drop the folder manually (arghh!!). FF3 seems to have sorted that (yippee!!)
  • I like the new smart-bookmarks, especially the one titled "Recently bookmarked" (good). You see, I have a very large collection of bookmarks that I've meticulously pruned over the years. One of my problems has been when I bookmark something about 5-6 levels down and I cant remember where (I know I can search bookmarks, but sometimes I just cant remember what I named it). This comes to my rescue.
  • I love the full zoom in/out feature (good). I often use it when I am sitting with someone with glasses and especially when I want to read the small print. Tip: the hot-key for resetting your zoom level is Ctrl+ 0 (that's a Zero)
  • I am particularly grateful for all the security & privacy features. It is good to know that I as well as the non-techies that I recommend this browser to are well-protected.
Here are some links i found useful:

17 Jun 2008

Where's Firefox 3?

Today was supposed to be the Firefox 3 (FF3) was supposed to be available for download. Then there was stuff about Firefox trying to set a world record for being the most downloaded software in 24 hours. And unless I am mistaken the day it was supposed to become available was - today. Here's what firefox's mouthpiece says:

The official date for the launch of Firefox 3 is June 17, 2008. Join our community and this effort by pledging today.

At the time of writing this post, the Firefox site continues to show v2 as the latest version to download. I would certainly say that it was missed quite a few of us in the GMT timezone.

Strangely, FF3 is available to download via Filehippo! I wonder what am i missing...

Update (18:51 BST): Here's a article on BBC that states that the attempt to break the record will begin at 1800 BST. It's 18:51 BST but there is no sign of FF3 being available on firefox.com. At this stage, although the download is indirectly available (by say, slightly modifying the link for earlier downloads). I must confess that Mozilla has pretty much disappointed those of us sitting the EU.

Update (18:53 BST): I've just received a reminder email from spreadfirefox.com asking me to download FF3 from here. Unfortunately, I think the link is down (as is firefox.com) from all the hits they are probably getting :)

Update (19:11 BST): Nope, the website is pretty much still serving version 2 as the latest. I am starting to see people grumble already. Here's an example.

Update (19:42): Welcome digg users (thanks to whoever dugg this). But while looking through other digg posts on this topic, I came across this post from mozilla-europe.org proclaiming that the British version of FF3 is available for download (perhaps meant for EU users) here. Finally!! The next update -- from within FF3 (here i come!)