Skip to content

Commit 29162c9

Browse files
authored
Merge pull request #147 from jeevatkm/WebExtension
RWH v3.0.0 Beta WebExtension
2 parents d5ac99e + 8cafa2f commit 29162c9

38 files changed

+1350
-2031
lines changed

.github/FUNDING.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
github: [jeevatkm]
2+
custom: ["https://www.paypal.com/donate/?cmd=_donations&business=QWMZG74FW4QYC&lc=US&item_name=ReplyWithHeader+(RWH)+Thunderbird+Addon&currency_code=USD"]

.github/workflows/release.yaml

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,20 @@
1-
name: release
1+
name: Create release
22

33
on:
44
push:
55
tags:
6-
- '*'
7-
workflow_dispatch:
6+
- 'v*'
7+
8+
permissions:
9+
contents: write
810

911
jobs:
10-
build_release:
11-
name: build_release
12+
build:
13+
name: Create release from tag
1214
runs-on: ubuntu-latest
1315
steps:
1416
- name: GIT checkout
15-
uses: actions/checkout@v3
17+
uses: actions/checkout@v4
1618
with:
1719
fetch-depth: 0
1820
- name: Read version from manifest.json
@@ -25,7 +27,7 @@ jobs:
2527
- name: Build artifacts
2628
run: zip -r replywithheader-v${{ steps.version.outputs.VERSION }}.xpi * -x ".*"
2729
- name: Create release
28-
uses: softprops/action-gh-release@v1
30+
uses: softprops/action-gh-release@v2
2931
if: startsWith(github.ref, 'refs/tags/') # Only run for new tags
3032
with:
3133
body_path: Changelog.tmp

README.md

Lines changed: 25 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,45 @@
1-
# Quoting Email Headers in Thunderbird
2-
[![Version](https://img.shields.io/badge/version-2.6.0-blue.svg)](https://github.com/jeevatkm/ReplyWithHeaderMozilla/releases/latest) [![License](https://img.shields.io/github/license/jeevatkm/ReplyWithHeaderMozilla.svg)](LICENSE)
1+
<p align="center">
2+
<p align="center"><img src="images/rwh.svg" height="128" width="128" /></p>
3+
<h1 align="center">ReplyWithHeader (RWH)</h1>
4+
<p align="center">Outlook style headers and few goodies for Thunderbird</p>
5+
</p>
6+
<p align="center">
7+
<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>
8+
</p>
39

4-
ReplyWithHeaderMozilla aka [RWH Thunderbird] is an add-on for Thunderbird mail client that enables email header.
5-
Brings Outlook header capabilities into Thunderbird.
10+
## Download
11+
Head to Thunderbord Add-ons store to download. **RWH v3 is completly rewritten from ground up in {Web|Mail}Extension model**
612

7-
**| [Home page](http://myjeeva.com/replywithheader-mozilla) | [Download RWH Mozilla](https://addons.mozilla.org/en-US/thunderbird/addon/replywithheader/) | [Report Issues](#report-issues) | [FAQ](http://myjeeva.com/replywithheader-mozilla#faq) |**
13+
<p align="center"><b><a href="https://addons.thunderbird.net/en-US/thunderbird/addon/replywithheader/" alt="">Thunderbird Add-ons Store</a></b></p>
814

9-
# Support RWH - Donate
15+
## Features
16+
ReplyWithHeader (RWH) is an Thunderbird email client add-on, that brings outlook style headers and few goodies into Thunderbird.
17+
<p align="center">
18+
<img src="images/rwh-features.png" />
19+
</p>
1020

11-
BTC | Paypal
12-
--- | ---
13-
1FG6G5tCmFm7vrc7BzUyRxr3RBrMDJA6zp | [![Donate with Paypal](https://www.paypalobjects.com/webstatic/en_US/btn/btn_donate_pp_142x27.png)](https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=QWMZG74FW4QYC&lc=US&item_name=Jeevanandam%20M%2e&item_number=ReplyWithHeaderMozilla&currency_code=USD&bn=PP%2dDonationsBF%3abtn_donateCC_LG%2egif%3aNonHosted)
21+
## Support & Donate
1422

15-
# Report Issues
23+
* Write reviews and give Stars on [Thunderbird Add-ons Store](https://addons.thunderbird.net/en-US/thunderbird/addon/replywithheader/)
24+
* Donate via [PayPal](https://www.paypal.com/donate/?cmd=_donations&business=QWMZG74FW4QYC&lc=US&item_name=ReplyWithHeader+(RWH)+Thunderbird+Addon&currency_code=USD)
25+
* Sponsor via [GitHub](https://github.com/sponsors/jeevatkm)
26+
27+
## Report Issues
1628

1729
ReplyWithHeaderMozilla uses [GitHub’s integrated issue tracking system](https://github.com/jeevatkm/ReplyWithHeaderMozilla/issues) to record bugs and feature requests. If you want to raise an issue, please follow the recommendations bellow:
1830

1931
* Before you log a bug, please search the issue tracker to see if someone has already reported the problem. If the issue doesn’t already exist, create a new issue.
2032
* Please provide as much information as possible with the issue report, we like to know the version of ReplyWithHeader that you are using.
2133
* If you need to paste code, or include a stack trace use Markdown code block
2234

23-
# Creator
35+
## Creator
2436

2537
[Jeevanandam M.](https://github.com/jeevatkm) (jeeva@myjeeva.com)
2638

27-
# Contributors
39+
## Contributors
2840

2941
Have a look on [Contributors](https://github.com/jeevatkm/ReplyWithHeaderMozilla/graphs/contributors) page.
3042

31-
# License
43+
## License
3244

3345
ReplyWithHeader Mozilla is released under [MPL-2.0 License](LICENSE)

background.html

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="utf-8">
5+
<script type="module" src="background.js"></script>
6+
</head>
7+
<body>
8+
</body>
9+
</html>

background.js

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
/*
2+
* Copyright (c) Jeevanandam M. (jeeva@myjeeva.com)
3+
*
4+
* This Source Code Form is subject to the terms of the Mozilla Public
5+
* License, v. 2.0. If a copy of the MPL was not distributed with this
6+
* file, You can obtain one at
7+
* https://github.com/jeevatkm/ReplyWithHeaderMozilla/blob/master/LICENSE
8+
*/
9+
10+
import { rwhLogger } from './modules/logger.mjs';
11+
import * as rwhMenus from './modules/menus.mjs';
12+
import * as rwhCompose from './modules/compose.mjs';
13+
import * as rwhTabs from './modules/tabs.mjs';
14+
import * as rwhSettings from './modules/settings.mjs';
15+
import * as rwhAccounts from './modules/accounts.mjs';
16+
17+
messenger.runtime.onInstalled.addListener(async function(details) {
18+
// About 'details' argument
19+
// Refer here: https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/runtime/onInstalled
20+
rwhLogger.debug(details);
21+
let accounts = await rwhAccounts.all();
22+
rwhSettings.setAccountDefaults(accounts);
23+
});
24+
25+
messenger.accounts.onCreated.addListener(async function(id, account){
26+
rwhLogger.debug('onCreated', id, account);
27+
if (account.type === 'imap' || account.type === 'pop3') {
28+
rwhSettings.setDefault(`${id}.enabled`, true);
29+
}
30+
});
31+
32+
messenger.accounts.onDeleted.addListener(async function(id){
33+
rwhLogger.debug('onDeleted', id);
34+
rwhSettings.remove(`${id}.enabled`);
35+
});
36+
37+
async function init() {
38+
await rwhSettings.setDefaults();
39+
40+
await rwhMenus.register();
41+
42+
rwhTabs.register('messageCompose', async (tab) => {
43+
await rwhCompose.process(tab);
44+
});
45+
46+
}
47+
48+
try {
49+
init();
50+
rwhLogger.info('Addon loaded successfully');
51+
} catch(e) {
52+
rwhLogger.error(e);
53+
}

0 commit comments

Comments
 (0)