Embedding preferences
nsIPrefService provides enable/disable and settings functionality for mozilla. Below are *some* prefs that are used to control various settings that may be pertinent to embedding scenarios. If you have other's please let me know . These are not public yet so use at your own risk.
CAPS (capabilities/privileges)
You can control JS access/privileges using these prefs. See http://www.mozilla.org/projects/security/components/ConfigPolicy.html for more info. See Mitch Stoltz regarding questions/concerns/suggestions in this area.
Name | Value Type | Changeable at runtime |
---|---|---|
javascript.enabled | boolean | yes |
capability.policy.strict.sites | string (space delimited list of urls) | yes |
capability.principal.window.open | string (example: "noAccess") | yes |
capability.principal.default.htmlinputelement.value | string (example: "sameOrigin") | yes |
capability.principal.default.location.host | string (example: "sameOrigin") | yes |
capability.principal.default.navigator.preference.read | string (example: "UniversalPreferencesRead") | yes |
Accessibility
There are a number of settings that are useful for accessibility.
Name | Value Type | Changeable at runtime |
---|---|---|
network.image.imageBehavior | int (0=Accept, 1=Accept images from originating server only, 2=no images) | yes |
network.cookie.cookieBehavior | int (0=Accept, 1=Accept cookies from originating server only, 2=no cookies) | yes |
browser.display.foreground_color | string, hex color value (like #abcdef) | yes |
browser.display.background_color | string, hex color value (like #abcdef) | yes |
browser.display.use_system_colors | boolean | yes |
browser.display.use_document_colors | boolean (if false, prevents background images from loading) | yes |
browser.anchor_color | string, hex color value (like #abcdef) | yes |
browser.visited_color | string, hex color value (like #abcdef) | yes |
image.animation_mode | string, "normal", "none" or "once" | yes |
User Agent
You can modify the User Agent string sent out in HTTP requests. See
http://lxr.mozilla.org/seamonkey/source/netwerk/protocol/http/src/nsHTTPHandler.cpp#616
for usage of each piece. Generally, the ".misc
" field is used by
people to "tag" the UA w/ their grafitti.
Name | Value Type | Changeable at runtime |
---|---|---|
general.useragent.locale | string (a chrome:// url pointing to a properties file) | unknown |
general.useragent.misc | string (example: "m18") | unknown |
general.useragent.override | string (a string to completely override the UA string) | unknown |
general.useragent.vendor | string | |
general.useragent.vendorSub | string | |
general.useragent.vendorComment | string | |
general.useragent.product | string | |
general.useragent.productSub | string | |
general.useragent.productComment | string | |
general.useragent.misc | string | |
general.useragent.security | string |
Fonts
For other i18n charsets, change x-western in the preference name to x-central-euro, x-cyrillic, x-unicode, x-user-def, x-baltic, el, tr, he, ar, th, ja, zh-CN or zh-TW.
Name | Value Type | Changeable at runtime |
---|---|---|
font.name.monospace.x-western | string | yes |
font.name.serif.x-western | string | yes |
font.name.sans-serif.x-western | string | yes |
font.default | string "serif" or "sans-serif" | yes |
browser.use_document_fonts | int, 0=no, 1=yes | yes |