0.0.2 • Published 6 years ago

open-in-chrome v0.0.2

Weekly downloads
2
License
ISC
Repository
github
Last release
6 years ago

open-in-chrome

npm version Build Status Coverage Status

Open a URL in Chrome or, on macOS, switch to the existing tab if it's already opened

Installation

Use npm.

npm install open-in-chrome

API

const openInChrome = require('open-in-chrome');

openInChrome(url , options)

url: string or URL
options: Object
Return: Object

It only supports macOS, Linux and Windows.

On macOS, it runs a JXA script which launches Chrome and open a URL in a new tab

On Linux, it opens a URL with google-chrome command in a new tab.

On Windows, it opens a URL with start C:\path\to\chrome.exe command in a new tab.

options

Type: Object

All execa options are available

License

ISC License © 2018 Shinnosuke Watanabe