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

Add a branch for Reedy on Mozilla Firefox #28

Merged
merged 19 commits into from Jul 13, 2018
Merged

Conversation

Cito
Copy link

@Cito Cito commented Jul 11, 2018

Here are some of the things I needed to change in order to make it play well with Mozilla:

  • Add an add-on ID to the manifest because we're using storage.sync
  • Remove unsupported manifest.json settings
  • chrome-extension:// should be moz-extension:// or simply use absolute path
  • The fontSettings API isn't supported by Firefox, resorted to a hard-coded list of fonts
  • Removed Google Analytics (must be implemented differently if needed)
  • Fixed an issue with strict mode (web extensions seem to run in strict mode on Firefox)
  • Fixed an issue with different CSS specificity on Firefox
  • Used text input fields instead of HTML5 color picker because of a bug in Firefox
  • Refactored code to not use innerHTML to avoid security warnings (problem in automated review)

I also did some code cleanup and modernization (e.g. using let and const instead of var) that were not actually necessary for the code to run on Firefox.

Cito added 19 commits July 9, 2018 13:18
- remove manifest settings not supported by Firefox
- we need an add-on ID because we use storage.sync
Since Firefox doesn't support the fontSettings API yet,
we use a hard coded list of web safe CSS fonts.
The msg.key property was accessed while not being set.
The variables are not needed, but the divs must still be created.
The rule ".e-Reedy-wrapper *" in content.css overrules
the dynamically set styles, so we have to be more specific
when setting our styles.
Unfortunately, we cannot use the HTML5 color picker in Firefox,
because the popup immediately closes whenever the color picker opens.

See https://bugzilla.mozilla.org/show_bug.cgi?id=1474423
The rule ".e-Reedy-wrapper *" in content.css overruled
the dynamically set styles in case of the light theme.
Now we use an explicit rule for the light theme as well.
Due to both security and performance concerns, the web-ext
linter creates warnings when innerHTML() is used. This may
also be problematic when submitting the add-on to Mozilla.
For some strange reason this is only needed in Firefox, not in Chrome.
@amal
Copy link
Collaborator

amal commented Jul 12, 2018

@Cito Thank you very much for this work!
I'll test and merge it to the separate "firefox" branch today.

@amal amal self-assigned this Jul 12, 2018
@amal amal changed the base branch from master to firefox July 13, 2018 08:21
@amal amal merged commit e036cb6 into olegcherr:firefox Jul 13, 2018
@skywinder
Copy link

skywinder commented Dec 26, 2019

@amal should I build version from firefox branch or use another plugin?

@skywinder
Copy link

I build the fork from the firefox branch and publish plugin. Enjoy! https://addons.mozilla.org/en-GB/firefox/addon/reedy-for-forefox/

ANd Huge thanks to @Cito for this port! 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants