1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-01-06 18:44:14 +01:00

Change multiline error message guard clauses to single line formatting.

Also apply similar formattng fixes to conditional blocks as per
standard.
This commit is contained in:
Doug Kearns
2009-05-22 02:36:35 +10:00
parent 4c4295029e
commit 26dabbfd0d
20 changed files with 70 additions and 400 deletions

View File

@@ -100,9 +100,7 @@ function Addressbook() //{{{
+ " -lastname=" + names[1].replace(/"/g, "");
}
else
{
displayName = "-name=\"" + displayName.replace(/"/g, "") + "\"";
}
commandline.open(":", "contact " + address + " " + displayName, modes.EX);
});

View File

@@ -707,10 +707,7 @@ function Mail() //{{{
// TODO: is there a better way to check for validity?
if (addresses.some(function (recipient) !(/\S@\S+\.\S/.test(recipient))))
{
liberator.echoerr("Exxx: Invalid e-mail address");
return;
}
return void liberator.echoerr("Exxx: Invalid e-mail address");
mail.composeNewMail(mailargs);
},
@@ -789,10 +786,7 @@ function Mail() //{{{
var url = args.attachments.pop();
var file = io.getFile(url);
if (!file.exists())
{
liberator.echoerr("Exxx: Could not attach file `" + url + "'", commandline.FORCE_SINGLELINE);
return;
}
return void liberator.echoerr("Exxx: Could not attach file `" + url + "'", commandline.FORCE_SINGLELINE);
attachment = Components.classes["@mozilla.org/messengercompose/attachment;1"]
.createInstance(Components.interfaces.nsIMsgAttachment);