Skip to content

Commit

Permalink
Merge pull request #147 from jeevatkm/WebExtension
Browse files Browse the repository at this point in the history
RWH v3.0.0 Beta WebExtension
  • Loading branch information
jeevatkm authored May 13, 2024
2 parents d5ac99e + 8cafa2f commit 29162c9
Show file tree
Hide file tree
Showing 38 changed files with 1,350 additions and 2,031 deletions.
2 changes: 2 additions & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
github: [jeevatkm]
custom: ["https://www.paypal.com/donate/?cmd=_donations&business=QWMZG74FW4QYC&lc=US&item_name=ReplyWithHeader+(RWH)+Thunderbird+Addon&currency_code=USD"]
16 changes: 9 additions & 7 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -1,18 +1,20 @@
name: release
name: Create release

on:
push:
tags:
- '*'
workflow_dispatch:
- 'v*'

permissions:
contents: write

jobs:
build_release:
name: build_release
build:
name: Create release from tag
runs-on: ubuntu-latest
steps:
- name: GIT checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Read version from manifest.json
Expand All @@ -25,7 +27,7 @@ jobs:
- name: Build artifacts
run: zip -r replywithheader-v${{ steps.version.outputs.VERSION }}.xpi * -x ".*"
- name: Create release
uses: softprops/action-gh-release@v1
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/') # Only run for new tags
with:
body_path: Changelog.tmp
Expand Down
38 changes: 25 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,33 +1,45 @@
# Quoting Email Headers in Thunderbird
[![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)
<p align="center">
<p align="center"><img src="images/rwh.svg" height="128" width="128" /></p>
<h1 align="center">ReplyWithHeader (RWH)</h1>
<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>
</p>

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

**| [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) |**
<p align="center"><b><a href="https://addons.thunderbird.net/en-US/thunderbird/addon/replywithheader/" alt="">Thunderbird Add-ons Store</a></b></p>

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

BTC | Paypal
--- | ---
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)
## Support & Donate

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

## Report Issues

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:

* 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.
* Please provide as much information as possible with the issue report, we like to know the version of ReplyWithHeader that you are using.
* If you need to paste code, or include a stack trace use Markdown code block

# Creator
## Creator

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

# Contributors
## Contributors

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

# License
## License

ReplyWithHeader Mozilla is released under [MPL-2.0 License](LICENSE)
9 changes: 9 additions & 0 deletions background.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<script type="module" src="background.js"></script>
</head>
<body>
</body>
</html>
53 changes: 53 additions & 0 deletions background.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
/*
* Copyright (c) Jeevanandam M. (jeeva@myjeeva.com)
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at
* https://github.com/jeevatkm/ReplyWithHeaderMozilla/blob/master/LICENSE
*/

import { rwhLogger } from './modules/logger.mjs';
import * as rwhMenus from './modules/menus.mjs';
import * as rwhCompose from './modules/compose.mjs';
import * as rwhTabs from './modules/tabs.mjs';
import * as rwhSettings from './modules/settings.mjs';
import * as rwhAccounts from './modules/accounts.mjs';

messenger.runtime.onInstalled.addListener(async function(details) {
// About 'details' argument
// Refer here: https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/runtime/onInstalled
rwhLogger.debug(details);
let accounts = await rwhAccounts.all();
rwhSettings.setAccountDefaults(accounts);
});

messenger.accounts.onCreated.addListener(async function(id, account){
rwhLogger.debug('onCreated', id, account);
if (account.type === 'imap' || account.type === 'pop3') {
rwhSettings.setDefault(`${id}.enabled`, true);
}
});

messenger.accounts.onDeleted.addListener(async function(id){
rwhLogger.debug('onDeleted', id);
rwhSettings.remove(`${id}.enabled`);
});

async function init() {
await rwhSettings.setDefaults();

await rwhMenus.register();

rwhTabs.register('messageCompose', async (tab) => {
await rwhCompose.process(tab);
});

}

try {
init();
rwhLogger.info('Addon loaded successfully');
} catch(e) {
rwhLogger.error(e);
}
Loading

0 comments on commit 29162c9

Please sign in to comment.