-, , . -, , , boolean-AND && +. - :
var username = GM_getValue("username");
var password = GM_getValue("password");
if ((username.length == 0) && (password.length == 0)) {
username = $('input[name=username]').val();
password = $('input[name=password]').val();
}
$(".button").click(function(){
GM_setValue ("username", username);
GM_setValue ("password", password);
});