mozdev.org

Dict

resources:

The Dict project has moved to SourceForge. Thank you mozdev.org for hosting the project for over a decade.

The project is a Mozilla extension that lets you easily look up the definition of words on a Web page using an online dictionary. Simply select a word, right-click, and you'll see a menu option to define the selected word. The definitions are returned in a new window.

The project is an implementation of a DICT protocol client. The DICT protocol is defined in RFC 2229. By default, the extension queries the DICT server on dict.org for definitions, but it can be configured to use any DICT server.

Feature Set

The latest release of the project is usable, but does not support the full set of features planned for the 1.0.0 release. The following features have been implemented:

The following set of features are not yet supported:

Tips for Power-Users

Here are some tips for power-users.
Customizing userContent.css to reskin the HTML popups

As of version 0.5.12, the HTML popups can be styled by by modifing your $MOZ_USER_DIR/chrome/userContent.css file. The set of CSS classes and their uses are given in the following table.

CSS Class Name Where it's Used
dict-database The style that encloses the name of the database from which the definition comes. This is already enclosed in bold tags (<B>), so you may want to add font-weight: normal; to your style sheet.
dict-definition The style that encloses the definintion of each word. This is enclosed in code tags (<CODE>), so you may be unable to change the font that is used.
dict-heading The style for all generic headings. Currently, the only one is in the "Closest Matches" page that is returned by the "dict" protocol handler. It contains the text "Closest Matches". This is already enclosed in bold tags (<B>), so you may want to add font-weight: normal; to your style sheet.
dict-horizontal-rule The style of all <HR> tags. Currently, the only one is in the "Closest Matches" page that is returned by the "dict" protocol handler. The rule is between the text that explains the page and the list of close matches.
dict-page The style on the BODY element. Use this to control the overall look and feel of the entire page.
dict-pronunciaton The style that encloses the pronunciation guides. This class is only available in version 0.7.0 or later.
dict-text The style for all non-definition text. Currently, the only one is in the "Closest Matches" page that is returned by the "dict" protocol handler. It encloses the text that explains the purpose of the page.

Using a non-standard DICT server

The Dict extension UI does not allow users to specify their own DICT server. The stock selection of DICT servers (which includes localhost) is sufficient for most use-cases, but this does not cover all use-cases. For example, some users may have a centralized DICT server somewhere on their intranet.

As a work-around, users can customize their preferences outside of the standard preferences UI:

  1. Type "about:config" in the address bar and press ENTER.
  2. Type "extensions.dict" in the Filter field.
  3. Right-click on "extensions.dict.defaultservername" - select modify, and change it to the hostname or IP address of the desired server.
  4. If the DICT server is listening on a non-standard port, right-click on "extensions.dict.defaultserverport", select modify, and change it to the port on which the DICT server is listening.

Related Project

The dictionarysearch has the same functional goals as the project. Instead of using the DICT protocol, it uses HTTP to talk to a multitude of dictionary Web sites and opens a new tab with professionally formatted definitions.

For questions or comments about dict, please email the author.
For questions or comments not about a specific project, please read our feedback page.
This page was last updated on Sep 16, 2014.
Copyright © 2014. All rights reserved.