Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Moved UnicodeFontHandler to background scripts #11

Merged
merged 2 commits into from
Nov 30, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@

<img height="200" width="200" src="assets/header.svg">

This is a (Firefox) add-on (WebExtension) that allows you to autocorrect common text sequences and convert text characters to a look like a special font.
This is a (Firefox and Thunderbird) add-on (WebExtension) that allows you to autocorrect common text sequences and convert text characters to a look like a special font.
For instance, it converts quotes like `"these"` to `“these”`, which are typographically more correct.

In contrast to many other add-ons, …

It is/has/features…

It is inspired by …. This extension only works with modern Firefox v78 or higher.
It is inspired by …. This extension only works with modern Firefox and Thunderbird v78 or higher.

## Download

Expand All @@ -30,7 +30,7 @@ See:

## Features
* Puts your privacy first! Privacy is the default here.
* Follows the [Firefox Photon Design](https://design.firefox.com/photon).
* Follows the [Firefox](https://design.firefox.com/photon) and [Thunderbird](https://style.thunderbird.net/) Photon Design.
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh nice, let’s hope these design systems don’t diverge too much… 🙃

* Has a simple, but intuitive and usable User Interface.
* Translated in several languages already. [Contribute your own language!](CONTRIBUTING.md#Translations)
* Compatible with Firefox for Android
Expand Down
2 changes: 1 addition & 1 deletion src/background/background.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as AutocorrectHandler from "/common/modules/AutocorrectHandler.js";
import * as UnicodeFontHandler from "/common/modules/UnicodeFontHandler.js";
import * as UnicodeFontHandler from "./modules/UnicodeFontHandler.js";

// init modules
AutocorrectHandler.init();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import * as AddonSettings from "/common/modules/AddonSettings/AddonSettings.js";
import * as BrowserCommunication from "/common/modules/BrowserCommunication/BrowserCommunication.js";
import { isMobile } from "./MobileHelper.js";
import { isMobile } from "/common/modules/MobileHelper.js";

import { COMMUNICATION_MESSAGE_TYPE } from "/common/modules/data/BrowserCommunicationTypes.js";
import { caseIds, fontIds, fonts } from "/common/modules/data/Fonts.js";
Expand Down Expand Up @@ -207,6 +207,7 @@ function applySettings(unicodeFont) {
* @returns {void}
*/
export async function init() {
// Remove once https://bugzilla.mozilla.org/show_bug.cgi?id=1595822 is fixed
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, this comment comments a await isMobile() exclusion, but your bug is about Thunderbird?
How is this related?

isMobile AFAIK should only check (and in this case exclude) Firefox for Android…

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, that bug is about implementing the WebExtension context menu API in Firefox for Android.

if (await isMobile()) {
return;
}
Expand Down
1 change: 1 addition & 0 deletions src/options/options.html
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ <h1 data-i18n="">Unicode autocorrection</h1>
</ul>
</section>

<!-- Remove "mobile-incompatible" once https://bugzilla.mozilla.org/show_bug.cgi?id=1595822 is fixed -->
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here…
Do you “abuse” this mobile-incompatible blacklisting for Thunderbird? 🙃

If so, that’s of course not the proper way to do so. Because this add-on may (as for the auto-correction part, at least), run fine on Firefox for Android (Fenix, if they allow all add-ons in a future version). So we need a different thunderbird-incompatible CSS and isThunderbird JS or so.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See above. The context menu does not currently work in the compose window of Thunderbird because of bug 1656506, although it does not need to be disabled and it looks like this may be fixed by bug 1670832.

<section class="mobile-incompatible">
<ul>
<h1 data-i18n="">Context menu</h1>
Expand Down