mozdev.org

guc

resources:
You can edit GUC configuration from the extensions dialog (Tools->Extensions) and selecting "Options".

GUC can help you create URL's from the selected text. The selected text is run through a list of rules which create the URLs that are made available in the context menu.

A GUC rule consists of a menu text, a search string and a URL. The menu text is the text that appears in the context menu. The search string is a JavaScript regular expression that will be evaluated on the selected text. The URL is the link that will open in a new tab when the user selects one of the menu texts in the context menu. The list of rules can either appear directly in the context menu or in a submenu of its own.

The search expression (a JavaScript regular expression) is evaluated on the selected text. The match string is available as ##. The submatches of the evaluation, if available, are available as #1, #2. #3 and so on. If no search expression is provided, the entire selected text is matched and is made available as ##. If the menu text and the URL contain the above tokens (##, #1, #2, ...), they are replaced by their corresponding values. If the evaluation fails, the menu text is not shown in the context menu.

The guc project can be contacted through the mailing list or the member list.
Copyright © 2000-2009. All rights reserved. Terms of Use & Privacy Policy.