open-in-chrome

0.0.2 • Public • Published

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

Package Sidebar

Install

npm i open-in-chrome

Weekly Downloads

2

Version

0.0.2

License

ISC

Unpacked Size

7.88 kB

Total Files

5

Last publish

Collaborators

  • shinnn