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 FF Support #4

Merged
merged 4 commits into from Feb 22, 2024
Merged

Add FF Support #4

merged 4 commits into from Feb 22, 2024

Conversation

nicholasmullikin
Copy link
Contributor

Hello!
I just discovered this add-on and love it! I wanted to use it on firefox, so I added a new build option for that. Unfortunately, I wasn't able to reuse the same manifest for both due to the background field being incompatible. I'm not really sure about best practices for multi browser support, so I just added more build options.

@Willxiam
Copy link

Willxiam commented Feb 18, 2024

nice @nicholasmullikin myself (and others) would also like to be able to use this on firefox but do not have the knowledge to help.

@iansinnott
Copy link
Owner

Thanks for this @nicholasmullikin! Regarding best practice for manifest files, having separate files is fine even if not ideal. Another option would be to have a transform the manifest via script to accommodate a specific browser. I had da script to do this early on so that it would build for both mv2 and mv3. it's fine to have separate files though.

However, how will this work?

The extension's runtime code still uses chrome-specific APIs (ex: https://github.com/iansinnott/full-text-tabs-forever/blob/master/src/background.ts#L91). Unless FF has a built-in compatibility layer then the extension will still not run in FF.

@nicholasmullikin
Copy link
Contributor Author

On manifest files: Yeah that sounds good to me. Happy to keep them separate.

Chrome APIs: I believe one of the packages must be providing a compatibility layer, but I'm not sure which one. When I inspect the extension and use the attached console, I am able to use the chrome API. I'm not quite sure exactly how this works though.
image

@iansinnott
Copy link
Owner

must be providing a compatibility layer,

Interesting. Yeah I'd like to know the answer here but no need to find out before shipping. Thanks!

@iansinnott iansinnott merged commit 3e041db into iansinnott:master Feb 22, 2024
@iansinnott iansinnott mentioned this pull request Feb 22, 2024
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.

None yet

3 participants