Created accounts are saved. Saved accounts are loaded automatically at startup. It is possible to delete an account. The accounts are stored in the preferences, under a messenger.account. branch. The list of accounts is in the preference messenger.accounts
This commit is contained in:
Родитель
4407789cc2
Коммит
eba2be2651
|
@ -4,3 +4,5 @@ pref("accessibility.browsewithcaret", true);
|
|||
|
||||
pref("javascript.options.showInConsole", true);
|
||||
pref("javascript.options.strict", true);
|
||||
|
||||
pref("messenger.accounts", "");
|
||||
|
|
|
@ -82,11 +82,13 @@ var account = {
|
|||
|
||||
getValue: function account_getValue(aId) {
|
||||
var elt = document.getElementById(aId);
|
||||
if ("checked" in elt)
|
||||
return elt.checked;
|
||||
return elt.value;
|
||||
},
|
||||
|
||||
create: function account_create() {
|
||||
var acc = this.pcs.createAccount(this.getValue("name"), this.proto);
|
||||
var acc = this.pcs.createAccount(this.getValue("name"), this.proto.id);
|
||||
acc.password = this.getValue("password");
|
||||
|
||||
var opts = this.proto.getOptions();
|
||||
|
@ -112,7 +114,7 @@ var account = {
|
|||
throw "unknown preference type " + opt.type;
|
||||
}
|
||||
}
|
||||
|
||||
acc.save();
|
||||
acc.connect();
|
||||
}
|
||||
};
|
||||
|
|
Загрузка…
Ссылка в новой задаче