(From update of attachment 378660)
>+function UpdateReplyButtons(aUrl)
>+{
>+ let msgHdr = msgHdrForCurrentMessage();
>+
>+ let myEmail = getIdentityForHeader(msgHdr).email;
>+ let recipients = msgHdr.recipients + "," + msgHdr.ccList;
>+
>+ // If my email address isn't in the to or cc list, then I've been bcc-ed.
>+ let imBcced = recipients.indexOf(myEmail) == -1;
>+
>+ // Now, let's get the number of unique recipients
>+ let hdrParser = Components.classes["@mozilla.org/messenger/headerparser;1"]
>+ .getService(Components.interfaces.nsIMsgHeaderParser);
>+ let addresses = {};
>+ let names = {};
>+ let fullNames = {};
>+ let uniqueRecipients = hdrParser.removeDuplicateAddresses(recipients, {});
>+ let numAddresses = hdrParser.parseHeadersWithArray(uniqueRecipients, addresses,
>+ names, fullNames);
You can pass in {} without naming the fields here, for the stuff you don't need later, no?
>+ // If we're Bcc:-ed, we should show the ReplyAll button.
>+ let showReplyAll = true;
>+ if (aUrl.scheme == "news")
>+ // If it's news, we should not show the ReplyAll button.
>+ showReplyAll = false;
Per previous comment, we should, only not as default.
(From update of attachment 378660) ons(aUrl) tMessage( ); eader(msgHdr) .email; indexOf( myEmail) == -1; classes[ "@mozilla. org/messenger/ headerparser; 1"] Components. interfaces. nsIMsgHeaderPar ser); removeDuplicate Addresses( recipients, {}); parseHeadersWit hArray( uniqueRecipient s, addresses,
>+function UpdateReplyButt
>+{
>+ let msgHdr = msgHdrForCurren
>+
>+ let myEmail = getIdentityForH
>+ let recipients = msgHdr.recipients + "," + msgHdr.ccList;
>+
>+ // If my email address isn't in the to or cc list, then I've been bcc-ed.
>+ let imBcced = recipients.
>+
>+ // Now, let's get the number of unique recipients
>+ let hdrParser = Components.
>+ .getService(
>+ let addresses = {};
>+ let names = {};
>+ let fullNames = {};
>+ let uniqueRecipients = hdrParser.
>+ let numAddresses = hdrParser.
>+ names, fullNames);
You can pass in {} without naming the fields here, for the stuff you don't need later, no?
>+ // If we're Bcc:-ed, we should show the ReplyAll button.
>+ let showReplyAll = true;
>+ if (aUrl.scheme == "news")
>+ // If it's news, we should not show the ReplyAll button.
>+ showReplyAll = false;
Per previous comment, we should, only not as default.