if ("@mozilla.org/login-manager;1" in GM_CC)
{
var loginManager = GM_CC["@mozilla.org/login-manager;1"].getService(GM_CI.nsILoginManage
var nsLoginInfo = new Components.Constructor("@mozilla.org/login-manager/loginInfo;1", G
var newLoginInfo = new nsLoginInfo(GM_PASSWORD_SITE, "/", null, aEmail, aPassword, "", "
// Lookup the login info for this email
var loginInfo = this._getLoginInfo(aEmail);
// Check if the login info exists
if (loginInfo)
loginManager.modifyLogin(loginInfo, newLoginInfo);
else
loginManager.addLogin(newLoginInfo);
}
else
{
try {
var pm = GM_CC["@mozilla.org/passwordmanager;1"].getService(GM_CI.nsIPasswordManager);
if (aPassword != null && aPassword != "")
pm.addUser(GM_PASSWORD_SITE, aEmail, aPassword);
} catch (e) {}
}
@mozilla.org/login-manager;1
or
@mozilla.org/passwordmanager;1 를 이용하네요.
Gmail manager는...
소스를 잠깐 보니..
@mozilla.org/login-manager;1
or
@mozilla.org/passwordmanager;1 를 이용하네요.
관련 내용은 https://developer.mozilla.org/en/Using_nsILoginManager 참고 하세요..
오픈소스 만세..
댓글 달기