Get metadata about the active tab in Chrome(title, url).
Works on macOS.
$ npm install chrome-active-tab
const chromeActiveTab = require('chrome-active-tab');
(async () => {
console.log(await chromeActiveTab());
/*
{
title: 'chrome-active-tab - npm',
url: 'https://www.npmjs.com/package/chrome-active-tab',
platform: 'macos'
}
*/
})();
Returns a Promise<Object>
with the result, or Promise<undefined>
if there is no active tab or if the information is not available.
Returns an Object
with the result, or undefined
if there is no active tab.
title
(string) - Tab titleurl
(string) - Tab urlplatform
(string) - Platform
It works on macOS.
MIT