Windows 10 reached EOS (end of support) on October 14, 2025. If you are on Windows 10, see this article.

جست‌وجوی پشتیبانی موزیلا

از کلاهبرداری‌های پشتیبانی اجتناب کنید. ما هرگز از شما نمی‌خواهیم که با شماره تلفن تماس بگیرید یا پیامک ارسال کنید یا اطلاعات شخصی خود را هم‌رسانی کنید. لطفاً فعالیت‌های مشکوک را با استفاده از گزینه «گزارش سوءاستفاده» گزارش دهید.

مانند نخ كشيده
باز

Whatever

thump3rtattoo@gmail.com

// Listening for the extension to trigger (e.g., via a custom command or button) async function forwardConversation(tabId, msgs) {

 let body = await exportConversationAsHtml(msgs);
 let displayedMsgs = await browser.messageDisplay.getDisplayedMessages(tabId);
 let identityId = undefined;
 if (displayedMsgs.length) {
   let accountId = displayedMsgs[0].folder.accountId;
   let account = await browser.accounts.get(accountId);
   identityId = account.identities[0]?.id;
 }
 await browser.compose.beginNew({
   identityId,
   isPlainText: false,
   body,
 });

}

async function exportConversationAsHtml(msgs) {

let hr = `
 
`;
 let html = `

Forwarded Conversation:

` + hr; let promises = msgs.map(msg => exportMsgAsHtml(msg)); let messagesHtml = await Promise.all(promises); html += `
` + messagesHtml.join(hr) + `
`; return html;

}

async function exportMsgAsHtml(msg) {

 // Simple fallback to extract text content safely
return `
From: ${msg.author || "Unknown"}
Subject: ${msg.subject}

${msg.body || ""}
`;

}

// Listening for the extension to trigger (e.g., via a custom command or button) async function forwardConversation(tabId, msgs) { let body = await exportConversationAsHtml(msgs); let displayedMsgs = await browser.messageDisplay.getDisplayedMessages(tabId); let identityId = undefined; if (displayedMsgs.length) { let accountId = displayedMsgs[0].folder.accountId; let account = await browser.accounts.get(accountId); identityId = account.identities[0]?.id; } await browser.compose.beginNew({ identityId, isPlainText: false, body, }); } async function exportConversationAsHtml(msgs) { let hr = `<div style="border-top: 1px solid #888; height: 15px; width: 70%; margin: 0 auto; margin-top: 15px">&nbsp;</div>`; let html = `<html><body><p>Forwarded Conversation:</p>` + hr; let promises = msgs.map(msg => exportMsgAsHtml(msg)); let messagesHtml = await Promise.all(promises); html += `<div style="font-family: sans-serif !important;">` + messagesHtml.join(hr) + `</div></body></html>`; return html; } async function exportMsgAsHtml(msg) { // Simple fallback to extract text content safely return `<div><strong>From:</strong> ${msg.author || "Unknown"}<br><strong>Subject:</strong> ${msg.subject}<br><br>${msg.body || ""}</div>`; }

پاسخ‌ها (1)

If you are a developer, please post your question at https://thunderbird.topicbox.com/groups/addons, but with more details.

یک سؤال بپرسید

شما باید برای پاسخ به پست‌ها وارد حسابتان شوید. اگر هنوز حسابی ندارید، لطفاًً یک سؤال جدید آغاز کنید.