// http://www.mozilla.org/unix/customizing.html#prefs
// Customizing Mozilla
//
// $Id: user.js,v 1.2 2004/11/17 22:15:51 vogelke Exp $
// $Source: /space/mozilla-1.7.3/local/RCS/user.js,v $
//
// The purpose of this document is to offer some hints about some of
// the less well documented features in Mozilla which can be customized
// to suit the user's preference.
//
// First, a note: these prefs generally have no UI in the prefs dialog,
// and must be set by editing the prefs file.  Normal prefs are kept
// in /prefs.js/ in the user's profile directory (which is overwritten
// by Mozilla every time a pref is changed), but here's a tip: prefs
// or other JavaScript that you don't want overwritten (e.g.  comments)
// can be put in a file called /user.js/ in the same directory, which
// is under the user's control and is read but never written by Mozilla.
//
// One caution with using user.js: prefs set to non-default values in
// user.js are also written to prefs.js, so removing or commenting out
// pref settings in user.js doesn't necessarily cause Mozilla to stop
// using your previous pref setting.  If you change user.js and aren't
// getting the results you expect, be sure to check prefs.js to make
// sure it isn't setting a conflicting value.
//
// Here are some prefs that I've found useful, and which I set in
// user.js.  You can get a fairly complete list of available preferences,
// and their current settings, by viewing the URL: about:config
//
// user.js: Personal prefs which mozilla shouldn't overwrite.
//
////////////////////////////////////////////////////////////
// Turning off annoyances
////////////////////////////////////////////////////////////

// Disable blinking text:
user_pref("browser.blink_allowed", false);

// Image animation mode: normal, once, none.
// This pref now has UI under Privacy & Security->Images.
user_pref("image.animation_mode", "once");

// Show pref UI to block images that don't come from the current server
// This is shown by default in Mozilla.
user_pref("imageblocker.enable", true);

// Turn that annoying autocomplete popup REALLY off:
// (This actually has a UI but it's buried.)
user_pref("browser.urlbar.autocomplete.enabled", false);
user_pref("browser.urlbar.showPopup", false);
user_pref("browser.urlbar.showSearch", false);

// Turn off the download manager (0=download manager, 1=simple dialog?)
user_pref("browser.downloadmanager.behavior", 1);

// Enable the marquee tag (disabled by default):
user_pref("browser.display.enable_marquee", true);

////////////////////////////////////////////////////////////
// Platform parity/UI issues
////////////////////////////////////////////////////////////

// Key modifier stuff: see bug 22515
// Motif-style access keys:
//user_pref("ui.key.accelKey", 18);
//user_pref("ui.key.menuAccessKey", 0);
//user_pref("ui.key.menuAccessKeyFocuses", false);

// Windows-style access keys:
//user_pref("ui.key.accelKey", 17);
//user_pref("ui.key.menuAccessKey", 18);
//user_pref("ui.key.menuAccessKeyFocuses", true);

// Uncomment this to turn off Unix-style autocopy
// (or set it to true to turn it on on non-Unix platforms):
//user_pref("clipboard.autocopy", false);

// Middle mouse prefs: true by default on Unix, false on other platforms.
//user_pref("middlemouse.paste", false);
//user_pref("middlemouse.openNewWindow", true);
//user_pref("middlemouse.contentLoadURL", false);
//user_pref("middlemouse.scrollbarPosition", false);

// Newline paste behavior: 0=paste unchanged, 1=paste only
// first line, 2=replace with spaces, 3=strip newlines
//user_pref("editor.singleLine.pasteNewlines", 0);

// Bug in Netscape 6 branch: drag out of frame style pref was
// never initialized on Unix, so dragging below a line of text
// doesn't snap selection to the end of the line.
//pref("browser.drag_out_of_frame_style", 1);

////////////////////////////////////////////////////////////
// UI look-and-feel issues
////////////////////////////////////////////////////////////

// Tab focus model bit field:
// 1 focuses text controls, 2 focuses other form elements,
// 4 adds links.
// Most users will want 1, 3, or 7.
user_pref("accessibility.tabfocus", 1);

// Don't ever show me a font smaller than this: see bug 30910.
// This is the new cross-platform pref; the old Unix-only
// font.min-size pref is deprecated and will be removed soon.
// A UI is now in place for this pref, and can be found under
// Appearance->Fonts.
user_pref("font.minimum-size.x-western", 16);

// X font banning: see bug 104075.
// Ban all arial fonts, because abiword installs an ugly one
// and there doesn't seem to be a good one available:
//user_pref("font.x11.rejectfontpattern", "fname=.*arial.*");

// Some alternate forms for rejectfontpattern:
// "fname=.*arial.*;scalable=.*;outline_scaled=.*;\
// xdisplay=.*;xdpy=.*;ydpy=.*;xdevice=.*");
// "fname=-zz-abiword.*;scalable=false;outline_scaled=false;");
// Alternately, reject font if accept pattern does not match it:
//user_pref("font.x11.acceptfontpattern", ".*");

// Set the submenu delay to be really long.
// This means that menus will stay posted until I click somewhere,
// making them behave more like Motif menus instead of un-posting
// whenever my mouse strays one pixel off the menu or cuts
// across the border between a menu and a submenu:
//user_pref("ui.submenuDelay", 7000);

// Typeahead find configuration:
//user_pref("accessibility.typeaheadfind", true);
//user_pref("accessibility.typeaheadfind.linksonly", true);
//user_pref("accessibility.typeaheadfind.startlinksonly", false);
//user_pref("accessibility.typeaheadfind.timeout", 5000);

// Set select colors for text:
user_pref("ui.textSelectBackground", "yellow");
user_pref("ui.textSelectForeground", "black");
// Select color for typeahead find is slightly different:
user_pref("ui.textSelectBackgroundAttention", "blue");
// Not clear when/if widgetSelectBackground ever gets called: let's find out.
user_pref("ui.widgetSelectBackground", "orange");

////////////////////////////////////////////////////////////
// Control of popup windows
////////////////////////////////////////////////////////////

// More important, disable JS windows popping up a new window on load
// (as lots of porn and spam sites do):
user_pref("dom.disable_open_during_load", true);

// Override popping up new windows on target=anything.
// This is now accessible in the prefs dialog, under Advanced|Scripts&Windows.
user_pref("browser.block.target_new_window", true);

// It is now possible to disable the JavaScript window.open() method
// when it is not called as a result of a mouse click.
// When the dom.disable_open_click_delay pref is set to a non-zero
// number, window.open will fail when called more than that number
// of milliseconds after a mouse click.
user_pref("dom.disable_open_click_delay", 1000);

////////////////////////////////////////////////////////////
// Miscellaneous stuff
////////////////////////////////////////////////////////////

// Override the default user-agent string:
//user_pref("general.useragent.override", "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.0; hi, Mom) Gecko/20020604");

// Syntax highlighting in View Source.
// This has a UI under Appearance->Colors
user_pref("browser.view_source.syntax_highlight", false);

// In chatzilla, show original text in addition to smiley substitutions:
user_pref("extensions.irc.munger.smileyText", true);

// Wrap column for html output from the editor:
user_pref("editor.htmlWrapColumn", 72);

// Show JS warnings. This is also available in the Debug panel
// under Preferences.
user_pref("javascript.options.strict", true);

// Change default paper size from US-Letter to A4:
//user_pref("print.postscript.paper_size", "A4");

////////////////////////////////////////////////////////////
// Useful mail/news prefs
////////////////////////////////////////////////////////////

// 0=bottom 1=top 2=select+bottom 3=select+top
// Mozilla defaults it to 0, but Netscape defaults it to 1 (yuck).
user_pref("mailnews.reply_on_top", 0);

// Show the user agent of incoming messages
user_pref("mailnews.headers.showUserAgent", true);

// Turn off the history addrbook
user_pref("mail.collect_email_address", false);

// Turn off graphical reply style in the message window
user_pref("mail.quoted_graphical", false);
// display glyph, see http://www.bucksch.org/1/projects/mozilla/16507
user_pref("mail.display_glyph", true);

// use HTML-style quoting for quoting plain text (during HTML replies)
user_pref("mail.quoteasblock", true);

// Format=flowed prefs, RFC 2646
user_pref("mailnews.send_plaintext_flowed", true);
user_pref("mailnews.display.disable_format_flowed_support", true);
user_pref("mail.display_struct", true);
user_pref("mail.send_struct", false);

// URI fixup prefs
user_pref("browser.fixup.alternate.enabled", false);
//user_pref("browser.fixup.alternate.prefix", "");
//user_pref("browser.fixup.alternate.suffix", ".your.domain");

// Internet keyword
user_pref("keyword.URL", "http://www.google.com/search?q=");

////////////////////////////////////////////////////////////
// Printing: scale default printer to 70% of page size to keep
// things from wrapping.
////////////////////////////////////////////////////////////

user_pref("print.printer_PostScript/default.print_command", "lpr -Pprinter");
user_pref("print.printer_PostScript/default.print_scaling", "  0.70");

