Skip to content

Commit

Permalink
Merge pull request #166 from jeevatkm/for-v3.1.0-release
Browse files Browse the repository at this point in the history
For v3.1.0 release
  • Loading branch information
jeevatkm authored Aug 10, 2024
2 parents 1a48d04 + 57ff201 commit 3023cbb
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 10 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
<p align="center">Outlook style headers and few goodies for Thunderbird</p>
</p>
<p align="center">
<a href="https://github.com/jeevatkm/ReplyWithHeaderMozilla/releases/latest" alt="Version"><img src="https://img.shields.io/badge/version-3.0.0-blue.svg" alt="Version" /></a> <a href="LICENSE" alt="LICENSE"><img src="https://img.shields.io/github/license/jeevatkm/ReplyWithHeaderMozilla.svg" alt="LICENSE" /></a> <a href="http://myjeeva.com/replywithheader-mozilla" alt"Home page"><img src="https://img.shields.io/badge/Homepage-blue" alt"Home page" /> </a>
<a href="https://github.com/jeevatkm/ReplyWithHeaderMozilla/releases/latest" alt="Version"><img src="https://img.shields.io/badge/version-3.1.0-blue.svg" alt="Version" /></a> <a href="LICENSE" alt="LICENSE"><img src="https://img.shields.io/github/license/jeevatkm/ReplyWithHeaderMozilla.svg" alt="LICENSE" /></a> <a href="http://myjeeva.com/replywithheader-mozilla" alt"Home page"><img src="https://img.shields.io/badge/Homepage-blue" alt"Home page" /> </a>
</p>

## Download
Head to Thunderbord Add-ons store to download. **RWH v3 is completly rewritten from ground up in {Web|Mail}Extension model**
Head to Thunderbird Add-ons store to download. **RWH v3 is completely rewritten from the ground up in {Web|Mail}Extension model**

<p align="center"><b><a href="https://addons.thunderbird.net/en-US/thunderbird/addon/replywithheader/" alt="">Thunderbird Add-ons Store</a></b></p>

Expand Down
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"manifest_version": 2,
"name": "ReplyWithHeader",
"description": "Outlook style headers and few goodies for Thunderbird",
"version": "3.1.0-dev",
"version": "3.1.0",
"author": "Jeevanandam M.",
"homepage_url": "https://myjeeva.com/replywithheader-mozilla",
"browser_specific_settings": {
Expand Down
15 changes: 8 additions & 7 deletions modules/compose.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -119,10 +119,7 @@ class ReplyWithHeader {

async process(tab) {
let result = { isModified: false };

if (rwhSettings.isTransSubjectPrefix()) {
result.subject = this._transformSubjectPrefix(this.#composeDetails.subject);
}
result.subject = await this._transformSubjectPrefix(this.#composeDetails.subject);

if (this.isPlainText) {
rwhLogger.debug('Plain Text', this.plainTextBody);
Expand Down Expand Up @@ -163,7 +160,7 @@ class ReplyWithHeader {
'cc': await this._extractHeader('cc', true, true),
'date': await this._extractHeader('date', false, true),
'reply-to': await this._extractHeader('reply-to', true, true),
'subject': this._transformSubjectPrefix(await this._extractHeader('subject', false, true)),
'subject': await this._transformSubjectPrefix(await this._extractHeader('subject', false, true)),
}
rwhLogger.debug(headers);

Expand Down Expand Up @@ -207,7 +204,7 @@ class ReplyWithHeader {
'cc': await this._extractHeader('cc', true, false),
'date': await this._extractHeader('date', false, false),
'reply-to': await this._extractHeader('reply-to', true, false),
'subject': this._transformSubjectPrefix(await this._extractHeader('subject', false, false)),
'subject': await this._transformSubjectPrefix(await this._extractHeader('subject', false, false)),
}
rwhLogger.debug(headers);

Expand Down Expand Up @@ -448,7 +445,11 @@ class ReplyWithHeader {
}
}

_transformSubjectPrefix(subject) {
async _transformSubjectPrefix(subject) {
if (!(await rwhSettings.isTransSubjectPrefix())) {
return subject;
}

if (subject.startsWith(rwhSettings.replySubjectPrefix)) {
return subject.replace(rwhSettings.replySubjectPrefix, 'RE:')
}
Expand Down

0 comments on commit 3023cbb

Please sign in to comment.