Skip to content

Fix issues with Firefox #48

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

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open

Conversation

benmuth
Copy link
Contributor

@benmuth benmuth commented May 1, 2025

Closes #46

This PR fixes the most glaring compatibility issues with Firefox. Users should now be able to use and configure the extension similarly to Chrome. It's currently based on #47, so auto-archiving works as well. There may still be cases where behavior differs, more feedback and testing is appreciated.

The main issues in Firefox were:

  • callback-based async APIs aren't supported
  • JavaScript code directly inside an HTML attribute violated Firefox's stricter CSP
  • making requests from the options page (like for testing the server URL) is a CORS violation
  • Firefox required initializing the popup by registering an event listener rather than calling a function directly. Not sure why, and I tried a few solutions here, but this was the one that worked well

benmuth and others added 7 commits April 24, 2025 16:50
Fixing the message handling also fixes a bug (that at least existed on
Firefox) where attempting to archive with an unconfigured ArchiveBox
server would lead to an undefined type error instead of an error message
that the server wasn't configured.
In Firefox, making requests directly from the options page (as we were
in config-tab.js) violates CORS, so we have to send messages to the
background script which then makes the requests to the server, as we're
doing with other requests.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

New Firefox release
2 participants