-
-
Notifications
You must be signed in to change notification settings - Fork 29
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
refactor(plugin): add file to consolidate chrome/firefox APIs #401
refactor(plugin): add file to consolidate chrome/firefox APIs #401
Conversation
@abhishek-nigam thank you so much! we had created an issue that was small in scope for hacktoberfest but your approach is better in the long run. We might need some time to test this out thoroughly so bear with us for that but this is a step in good direction. |
At 2-3 places in the codebase, we're checking if the browser is chrome or firefox, and hen using the corresponding APIs chrome.* or browser.* respectively. To reduce code repetition this adds a file browser-compat.js that exposes objects corresponding to various browser APIs such that they can be used by other functions in a browser agnostic way.
be3196b
to
61fa876
Compare
Hi @dennyabrain Good morning! Please let me know if any help/change is needed from my side. Rebased the PR to resolve some merge conflicts that had come up. |
Hi @abhishek-nigam |
Hi @dennyabrain That's totally understandable. Welcome and thanks for letting me know! |
hi @abhishek-nigam |
Hi @aatmanvaidya Sure, messaging you on Slack |
At 2-3 places in the codebase, we're checking if the browser is chrome or firefox, and hen using the corresponding APIs chrome.* or browser.* respectively. To reduce code repetition this adds a file browser-compat.js that exposes objects corresponding to various browser APIs such that they can be used by other functions in a browser agnostic way.
Hello @abhishek-nigam , thank you so much for the work, we have merged it! Now the task ahead is to make the code cross platform in the other sections of the code base using the |
…-made#401) * refactor(plugin): add file to consolidate chrome/firefox APIs At 2-3 places in the codebase, we're checking if the browser is chrome or firefox, and hen using the corresponding APIs chrome.* or browser.* respectively. To reduce code repetition this adds a file browser-compat.js that exposes objects corresponding to various browser APIs such that they can be used by other functions in a browser agnostic way. --------- Co-authored-by: Aatman Vaidya <aatmanvaidya@gmail.com>
* refactor(plugin): add file to consolidate chrome/firefox APIs At 2-3 places in the codebase, we're checking if the browser is chrome or firefox, and hen using the corresponding APIs chrome.* or browser.* respectively. To reduce code repetition this adds a file browser-compat.js that exposes objects corresponding to various browser APIs such that they can be used by other functions in a browser agnostic way. --------- Co-authored-by: Aatman Vaidya <aatmanvaidya@gmail.com>
Describe the PR
At 2-3 places in the codebase, we're checking if the browser is chrome or firefox, and hen using the corresponding APIs chrome.* or browser.* respectively. To reduce code repetition this adds a file browser-compat.js that exposes objects corresponding to various browser APIs such that they can be used by other functions in a browser agnostic way.
Steps to test the PR
We need to test all flows in our browser extension where browser specific APIs are being called
Expected behavior
It should work without error
Additional context
These changes were done for #325