Bookmarklets in Firefox

Firefox extensions are great for adding significant functionality to the browser but for simpler features that can be provided with a simple bookmarklet I prefer not to use an extension. The reason is that every extension adds more code and memory consumption which slows down your browser more and more. However, many bookmarklets are unable to open a new tab or window in their published form.

For example, I used to use the Del.icio.us Firefox extension back in Firefox 1.5 but I dislike how significantly the current version of the extension changes the bookmarks UI so I no longer use it. Del.icio.us also offers a couple of bookmarklets which allow you to tag a URL without the extension so that's what I now use.

My only issue with the bookmarklet is that it doesn't open a new window so that you can quickly type your tags, close the window, and get back to what you were doing. Instead, it loads the tagging page in the current tab forcing you click the browser back button a couple of times to get back to what you were doing. To resolve this issue I modified the bookmarklet to open a new tab instead of loading in the current tab.

All that's required is to change the location.href='' to var w=window.open().

My Del.icio.us bookmarklet: Tag this page

I ran into this issue again with Google's translation bookmarklets. In this case, the bookmarklets are a bit more sophisticated to work with a variety of browsers which behave differently. Modifying these bookmarklets to open in a new tab had the added benefit of removing a lot of unnecessary (for Firefox) code.

This Google Translate bookmarklet will open a new tab with a translation of either the currently selected text or the current URL.

To create bookmarklets for other languages, just modify the from and to variables with the desired language identifier.

Usage

The way I use these bookmarklets is by creating a folder in my Firefox bookmarks toolbar (e.g., "Translate") and placing them there. That way, I can translate any language (for which I've created a bookmarklet) as easily as if it were a Firefox menu option.

Trackback URL for this post:

http://intraplanar.net/trackback/96

Comments

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Allowed HTML tags: <p> <a> <em> <strong> <abbr> <code> <ul> <ol> <li> <dl> <dt> <dd> <q> <blockquote> <cite>
  • Lines and paragraphs break automatically.

More information about formatting options

Subscribe to feed