Wider Chromium support for openBrowser #8367
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hey there! The Contribution Guidelines say to ask before submitting a PR, but it doesn't say how to ask. I don't have a lot of experience contributing to OSS, so please let me know if I missed something.
This PR allows for CRA to control tabs on other Chromium-based browsers besides Google Chrome. How the code works:
shouldTryOpenChromiumWithAppleScript
.Other than that, the logic is essentially the same. Most people shouldn't see a difference in behavior except for those using a browser in the list above that's not Chrome; for those people, CRA will reuse the existing tab rather than a new tab.
I noticed that Safari has its own dictionary for AppleScripts. If it benefits anyone, I could look into implementing similar logic for Safari users. Unfortunately for Firefox users like myself, there seems to be no hope.
Apologies if I left something out, but I tried my best. Let me know what needs to be changed, would be proud to have my code in CRA.
Closes #8264