1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-23 10:18:00 +01:00

use object literal syntax rather than explicitly calling the constructor

This commit is contained in:
Doug Kearns
2008-07-29 22:09:00 +00:00
parent 626ef76789
commit ffbe5fa20c
2 changed files with 2 additions and 2 deletions

View File

@@ -192,7 +192,7 @@ liberator.Addressbook = function () //{{{
if (newMail) if (newMail)
{ {
// Now we have to create a new message // Now we have to create a new message
var args = new Object(); var args = {};
args.to = addresses.map(function (address) args.to = addresses.map(function (address)
{ {
return "\"" + address[0].replace(/"/g, "") + " <" + address[1] + ">\""; return "\"" + address[0].replace(/"/g, "") + " <" + address[1] + ">\"";

View File

@@ -678,7 +678,7 @@ liberator.Mail = function () //{{{
"Write a new message", "Write a new message",
function (args, special, count) function (args, special, count)
{ {
var mailargs = new Object(); var mailargs = {};
mailargs.to = args.arguments.join(", "); mailargs.to = args.arguments.join(", ");
mailargs.subject = args["-subject"]; mailargs.subject = args["-subject"];
mailargs.bcc = args["-bcc"]; mailargs.bcc = args["-bcc"];