Style wechseln: ?

Für diese Funktion muß JavaScript aktiviert sein.

wechseln zur deutschen VersionX-Mozilla-Status(2) explained :: Mozilla-Features :: Mozilla vs. Antivirus :: Mozilla-Links :: Mozilla-Applications

custom keywords
using keywords with an argument
Base64 en-/decoder
time- & date format

custom keywords

Mozilla has a feature called “Custom Keywords”. It’s an easy and inconspicuous feature—but these are often the best. It gives you the power of keyword search like Opera does.

What bookmarks are and how they’re created isn’t part of this text. How they’re used should be clear: scanning the bookmark menu for the desired page and clicking. This will take, depending on the organization of your bookmark collection, between a twinkle and ages. But Mozilla gives you the possibility to call a bookmark using a keyword.

To assign this, open your Bookmark Manager (e.g. via CTRL+B), choose the Bookmark and open its properties (e.g. via CTRL+I)—you’ll see this dialog (in Mozilla, in Firefox it looks different): Bookmarkeigenschaften

The key now literally is the field “Keyword”. What’s to be entered here is a (short) string which will, entered as URL, be replaced by the text in the “Location” field and executed like every other bookmark.
In the example “bug” as URL will call Bugzilla and display bug %s.

[arrow up] up

using keywords with an argument

Er, wait a sec, %s? That’s no valid bug number—Bugzilla will tell you, if you open But here it’s in fact a feature in a feature.

That’s because Mozillas bookmarks take arguments too! Everything entered in the URL bar behind the keyword and a space will be taken as argument: “bug 30651” calls (the by the way amusing) bug 30651. So it saves you from visiting, selecting the edit field and entering “30651”.

That works with any page which uses the GET method for submitting entered data. The URL looks mostly cryptic, but is easy to utilize.
Just enter e.g. the search term “Mozilla” into your favorite search engine and see what it generates—Google will convert it to “”. Then bookmark the result, replace the search term with %s and enter a keyword, “go” for example. Done

A few examples:

And there are dozends more.

This tutorial bases on

[arrow up] up

Base64 en-/cecoder

The features described above can be used for another nice trick. Mozilla provides internal functions for encoding and decoding Base64 strings. These can also be used by the user via Javascript, their names: btoa (->Base64) und atob (->Text).

Create a bookmark with address “javascript:btoa(%22%s%22)” (%22 is an url encoded quotation mark) and keyword “b64e”, resp. “javascript:atob(%22%s%22)” and keyword “b64d”.
So the conversion of text in a Base64 string is a matter of “b64e Test”. To reverse this process just type “b64d VGVzdA==”.

[arrow up] up

time- & date format

global date format

In order to format time- and date strings, Mozilla in general obeys the systems format. On Unices various locale environment variables are used, not the settings from the regarding panels of desktop environments like Gnome or KDE. The order of evaluation of these environment variables is system dependant. For glibc on Linux it is LC_ALL, LC_TIME, LANG. Populated with the according locale you can Mozilla make to display all standardised formats. Examples:
de_DE = 31.12.1999
en_US = 12/31/1999
en_GB = 31/12/99
en_DK = 1999-12-31 (ISO 8601)

Of course those variables don’t have to be set globally if the rest of the system shall not be changed. So to start for example Thunderbird on a Ubuntu Linux via an icon one can create a bash script with the following content and point the starter to it:
export LC_TIME=en_DK.UTF-8
/usr/bin/thunderbird $1

These variables also define the default for the date format to be used in attribution line of replies. To use another date format for this line independently of the format used elsewhere there’s the hidden pref mailnews.reply_header_locale. It needs a hyphen instead of an underscore, i.e. "de-DE" for example.
On Unices this option unfortunatelly didn’t work for a long time because of a bug, so everything else then empty ("") or "en_US" respectively gave also en_US. As of now this bug has been fixed though for all not using nightlies it will not be available before release of Thunderbird 3.0 and SeaMonkey 2.0 respectively. In the meantime on Unices remove this pref and leave the control to the variables.

On Windows to get the format according to ISO 8601 in the attribution line you’ve to use the locale “sv-SE”. This also works on Linux, that locale has to be installed however. Since it isn’t on most systems, it’s easier to use before named en_DK there.

I wasn’t able to figure out how to get Mac OS X using ISO 8601 in the attribution line. “en-DK” results in using the british format and “sv-SE” gets us very close but not to the point. The result: 99-12-31 23.53. I’d appreciate any useful hints.

[arrow up] up

Date column

Among others, the thread pane of the mail client can show a date column. By default it is configured so that it will show only the time for messages from today, no date. All others show the full date and time of the format 31.12.1999 23:59.

Many users don’t know that this behaviour can be configured as well. I don’t know why—it can’t only be the lack of a UI (where the extension below is a remedy), other, more well known prefs, don’t have one too.

Responsible for the configuration are the following prefs (editable through the URL about:config or the file prefs.js resp. user.js in profile folder):

0 = no date (23:53)
1 = long date format (e.g. Freitag, 31. Dezember 1999 23:53)
2 = short date format (e.g. 31.12.1999 23:53)
3 = year/month (1999/12 23:53)
4 = weekday (Fr 23:53)

(examples in de_DE format with 24 hours, your display will be in your system format)

The actual look of the short resp. long format (e.g. “Fr” instead of “Friday”) is configurable through the operating system.
On Unix systems the long is equal the short format, it’s generated by calling strftime with format string %x (so what “date +%x” displays on the console).

E.g.: The following configuration shows the time only for todays mails, weekday and time for mails from within the last 7 days (excluding today) and full date with time for all other:
user_pref(”mail.ui.display.dateformat.default”, 2);
user_pref(””, 0);
user_pref(”mail.ui.display.dateformat.thisweek”, 4);

The format for Time/Date in the mail header isn’t affected by this prefs.

[arrow up] up


Normaly date and time of the current message are converted to the timezone of your computer. But for some users/uses it would be useful to have the date and time displayed in the senders timezone—including the timezone (e.g. +0100 resp. MET).

Unfortunately due to internal restrictions (frozen interface of low-level functions) for years it wasn’t possible to have this time zone information available in the formatted time stamp.

Therefore in mid 2003 I implemented a way to at least display a verbatim copy of the date-string from the mail header. That has a few drawbacks, like not always the same format, particularly also localised names for weekdays and month (i.e. for example “Die” (German for “Thu”) on a english system), but that was the only way.

The associated pref was called mailnews.display.original_date—an UI didn’t exist.
It was activated by user_pref("mailnews.display.original_date", true); false, resp. removing the pref, switched it off again.

Now relatively short before release of Thunderbird 3.0 and SeaMonkey 2.0 and after some preparatory work in the backend a lokalisable and formattable display with time zone is finally possible. This can be activated using the pref mailnews.display.date_senders_timezone.
The old pref is migrated automatically and evaluated when set, but this is likely to change in later releases. The new behaviour is available in nightlies starting on 2009-03-12.

The format for Time/Date of the thread panes date column isn’t affected by thse prefs.

Since a while the extension ConfigDate for Thunderbird addresses the lack of an UI for the named prefs. So you can now adjust the dates without manually twiddling in the prefs.

[arrow up] up

last modified 2009-10-23
© Christian Eyrich
main page | webmaster