userChrome.js allows to easily customize Firefox through JavaScript.
What userChrome.css is for CSS customization, userChrome.js is for JavaScript. Simply edit the file userChrome.js (in the same place as userChrome.css) and its content will be run whenever a new browser window is opened (onLoad
). BTW: If you want this to become a standard part of Firefox in the future, go and post a patch to bug 332529.
Download
Note: This extension has been superceded by the userChromeJS extension. See its homepage for any support.
userChrome.js 0.8 [released 2007-06-07, updated 2008-10-26]
This release should work for Firefox and Thunderbird 2.0 and 3.0 as well as all Gecko 1.9 applications such as Seamonkey 2.0, Flock 2.0, Songbird 1.0, Fennec, etc.
Snippet collections
- A growing collection of snippets by the author of the ScrapBook extension (blog entries)
- A growing collection of snippets by alice0775 (Japanese, translation)
- Snippets collected from the original userChrome.js thread by Pirlouy
- Snippet collection from the MozillaZine Knowledge Base
- The original userChrome.js thread (and the new one)
Sample code
Basics (should work for most applications):
- Sub-Script/XUL Loader (automatically includes all scripts ending in .uc.js and .uc.xul from the profile's chrome folder - this allows you to keep your code snippets somewhat ordered)
- Tools menu entry to open the chrome folder
Extension replacements (for Firefox 3.0 and 3.5)
- Drag'n'go (Super DragAndGo without UI; also available as extension)
- Enter Selects (minor adjustment of Enter Selects)
- Fashion Tabs (Chromatabs lite; only tested with the default theme under Windows)
- LaunchIE (IEView without UI)
- Mouse Gestures (Optimoz' Mouse Gestures lite and without UI; adaptation of Gomita's Mouse Gestures)
- Tabs to the Right (Tabs Open Relative lite)
- Textarea Sizers (Resizable Textarea as a Greasemonkey-style userscript)
Revisions
- Version 0.8
- userChrome.js is now run for every chrome window, not just the main one
- Suggested for inclusion into one of the next Firefox versions (see bug 332529)
- Version 0.7
- Added support for most current Gecko applications
- Version 0.6
- The file userChrome.js is automatically created
- Version 0.5
- Initial release (2006-01-24)