-
Notifications
You must be signed in to change notification settings - Fork 90
Add Firefox compatibility support #221
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
base: master
Are you sure you want to change the base?
Conversation
- Add browser compatibility layer (browser-compat.js) - Update manifest.json to use background.scripts for Firefox - Replace chrome.* API calls with browserAPI.* calls - Add Firefox-specific settings in manifest - Create testing guides and documentation - Update package.json with testing scripts
Reviewer's GuideThis PR implements Firefox compatibility by introducing a cross-browser API wrapper, migrating all chrome.* calls to browserAPI.*, updating the manifest to meet Firefox requirements, and adding dedicated testing documentation and scripts. Class diagram for the new browser compatibility layer (browser-compat.js)classDiagram
class browserAPI {
+storage
+runtime
+i18n
}
class Storage {
+local
}
class LocalStorage {
+get(keys, callback)
+set(items, callback)
+remove(keys, callback)
+onChanged
}
class Runtime {
+onMessage
+lastError
+sendMessage(message)
}
class I18n {
+getMessage(messageName, substitutions)
}
browserAPI --> Storage : has
Storage --> LocalStorage : has
browserAPI --> Runtime : has
browserAPI --> I18n : has
File-Level Changes
Assessment against linked issues
Possibly linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @mohit200008 - I've reviewed your changes and they look great!
Prompt for AI Agents
Please address the comments from this code review:
## Individual Comments
### Comment 1
<location> `src/scripts/browser-compat.js:1` </location>
<code_context>
+// Browser compatibility layer for Chrome/Firefox differences
+
+// Detect browser
</code_context>
<issue_to_address>
No support for asynchronous sendMessage with callback in Chrome.
Please update the sendMessage wrapper to support both callback and Promise-based signatures for compatibility with Chrome's API.
</issue_to_address>
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
- Update sendMessage wrapper to support both callback and Promise patterns - Add sendMessagePromise helper for consistent Promise-based API - Improve error handling for Firefox Promise-to-callback conversion - Add comprehensive sendMessage tests to compatibility test suite - Ensure Chrome compatibility with callback-based sendMessage API
please review the changes and also the merge conflicts have been resolved, of everything seems right please merge my pr @hpdang |
please merge the pr if everything seems correct @hpdang |
@mohit200008 this need to be approved by one of the core contributors, maybe @Preeti9764 can check |
📌 Fixes
Fixes #220
📝 Summary of Changes
👀 Reviewer Notes
Add any special notes for the reviewer here
Summary by Sourcery
Add Firefox compatibility support by creating a unified browser compatibility layer, updating manifest and scripts, and providing documentation and test scripts for cross-browser validation.
New Features:
Enhancements:
Build:
Documentation:
Tests: