
Security News
Feross on TBPN: How North Korea Hijacked Axios
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.
get-chrome-tabs
Advanced tools
Get information of the currently opened Chrome tabs, for example URLs and titles
Get information of the currently opened Chrome tabs, for example URLs and titles
const getChromeTabs = require('get-chrome-tabs');
(async () => getChromeTabs() /* => [
{
windowIndex: 0,
windowVisible: true,
url: 'https://github.com/',
title: 'GitHub',
active: true,
loading: false
},
{
windowIndex: 0,
windowVisible: true,
url: 'https://www.npmjs.com/package/get-chrome-tabs',
title: 'get-chrome-tabs - npm',
active: false,
loading: false
},
{
windowIndex: 1,
windowVisible: true,
url: 'https://example.org/',
title: 'Example Domain',
active: true,
loading: false
}
] */)();
npm install get-chrome-tabs
const getChromeTabs = require('get-chrome-tabs');
option: Object
Return: Promise<Array<Object>>
macOS with JXA support is required.
Each object included in the resultant array has the following properties:
integer – An index of the window which contains the tab (0 (foremost), 1, ...)boolean – Whether the window which contains the tab is visible or notstring – A URL currently opened by the tabstring – The tab titleboolean – Whether the tab is currently selected or not. Each window has one active tab.boolean - Whether the tab is loading or notIt will be rejected when Chrome is not running.
Type: string (either 'canary' or 'chromium')
Instead of Chrome (default), refer to Chrome Canary or Chromium.
// When Chrome is not running but Chrome Canary is running
(async () => {
try {
await getChromeTabs();
} catch (err) {
err.message; //=> 'Tried to get tabs of Chrome, but Chrome is currently not running.'
}
await getChromeTabs({app: 'canary'}); //=> [{windowIndex: 0, windowVisible: true, ...}, ...]
})();
ISC License © 2018 Shinnosuke Watanabe
FAQs
Get information of the currently opened Chrome tabs, for example URLs and titles
We found that get-chrome-tabs demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.

Security News
OpenSSF has issued a high-severity advisory warning open source developers of an active Slack-based campaign using impersonation to deliver malware.

Research
/Security News
Malicious packages published to npm, PyPI, Go Modules, crates.io, and Packagist impersonate developer tooling to fetch staged malware, steal credentials and wallets, and enable remote access.