Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • C create-react-app
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 1,547
    • Issues 1,547
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 417
    • Merge requests 417
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Meta
  • create-react-app
  • Merge requests
  • !8367

Wider Chromium support for openBrowser

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Administrator requested to merge github/fork/handeyeco/chromium-tabs into master Jan 23, 2020
  • Overview 6
  • Commits 3
  • Pipelines 0
  • Changes 2

Created by: handeyeco

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:

  1. Checks if AppleScript is applicable. Logic isn't changed, but I renamed the variable to shouldTryOpenChromiumWithAppleScript.
  2. Runs through a list of supported browsers:
    • Chrome Canary (has to come before Chrome because of grep)
    • Chrome
    • Edge
    • Brave
    • Vivaldi
    • Chromium
  3. For each browser, it greps to see if that browser is a process
  4. If it finds a match, it passes the browser name to the AppleScript
  5. AppleScript uses the Google Chrome dictionary to control the provided browser

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 (closed)

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: github/fork/handeyeco/chromium-tabs