javascript: inline some missed cases