How do I access user preferences in Firefox? I have the following code:
var control = document.getElementById(control_id);
if (control) {
control.setAttribute('color', nsPreferences.copyUnicharPref(prefstr, default_val));
}
But when I run this, I get the following:
Error: nsPreferences is not defined
Source file: chrome://backgroundtoggle/content/options.xul
Line: 9
I'm having trouble wading through the Mozilla documentation. How do I make this do what I want?
Thanks.