{"id":17472734,"url":"https://github.com/shinnn/get-chrome-tabs","last_synced_at":"2025-04-09T22:53:40.542Z","repository":{"id":41551130,"uuid":"142947717","full_name":"shinnn/get-chrome-tabs","owner":"shinnn","description":"Get information of the currently opened Chrome tabs, for example URLs and titles","archived":false,"fork":false,"pushed_at":"2019-05-01T23:59:46.000Z","size":80,"stargazers_count":18,"open_issues_count":2,"forks_count":3,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-24T00:42:48.620Z","etag":null,"topics":["browser","chrome","chromium","javascript","jxa","macos","nodejs","open-scripting-architecture","osa","promise","tabs"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"isc","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/shinnn.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-07-31T01:45:13.000Z","updated_at":"2024-11-14T07:43:41.000Z","dependencies_parsed_at":"2022-07-09T09:00:20.899Z","dependency_job_id":null,"html_url":"https://github.com/shinnn/get-chrome-tabs","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shinnn%2Fget-chrome-tabs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shinnn%2Fget-chrome-tabs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shinnn%2Fget-chrome-tabs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shinnn%2Fget-chrome-tabs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shinnn","download_url":"https://codeload.github.com/shinnn/get-chrome-tabs/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247814898,"owners_count":21000664,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["browser","chrome","chromium","javascript","jxa","macos","nodejs","open-scripting-architecture","osa","promise","tabs"],"created_at":"2024-10-18T17:35:04.610Z","updated_at":"2025-04-09T22:53:40.522Z","avatar_url":"https://github.com/shinnn.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# get-chrome-tabs\n\n[![npm version](https://img.shields.io/npm/v/get-chrome-tabs.svg)](https://www.npmjs.com/package/get-chrome-tabs)\n[![Build Status](https://travis-ci.com/shinnn/get-chrome-tabs.svg?branch=master)](https://travis-ci.com/shinnn/get-chrome-tabs)\n[![Coverage Status](https://img.shields.io/coveralls/shinnn/get-chrome-tabs.svg)](https://coveralls.io/github/shinnn/get-chrome-tabs?branch=master)\n\n\u003cimg src=\"screenshot.png\" align=\"right\" width=\"460\"\u003e\n\nGet information of the currently opened [Chrome](https://www.google.cm/chrome/) tabs, for example URLs and titles\n\n\u0026nbsp;\n\n```javascript\nconst getChromeTabs = require('get-chrome-tabs');\n\n(async () =\u003e getChromeTabs() /* =\u003e [\n  {\n    windowIndex: 0,\n    windowVisible: true,\n    url: 'https://github.com/',\n    title: 'GitHub',\n    active: true,\n    loading: false\n  },\n  {\n    windowIndex: 0,\n    windowVisible: true,\n    url: 'https://www.npmjs.com/package/get-chrome-tabs',\n    title: 'get-chrome-tabs - npm',\n    active: false,\n    loading: false\n  },\n  {\n    windowIndex: 1,\n    windowVisible: true,\n    url: 'https://example.org/',\n    title: 'Example Domain',\n    active: true,\n    loading: false\n  }\n] */)();\n```\n\n## Installation\n\n[Use](https://docs.npmjs.com/cli/install) [npm](https://docs.npmjs.com/about-npm/).\n\n```\nnpm install get-chrome-tabs\n```\n\n## API\n\n```javascript\nconst getChromeTabs = require('get-chrome-tabs');\n```\n\n### getChromeTabs([*option*])\n\n*option*: `Object`  \nReturn: `Promise\u003cArray\u003cObject\u003e\u003e`  \n\n*macOS with [JXA](https://github.com/JXA-Cookbook/JXA-Cookbook#readme) support is required.*\n\nEach `Object` included in the resultant array has the following properties:\n\n* windowIndex `integer` – An index of the window which contains the tab (`0` (foremost), `1`, ...)\n* windowVisible `boolean` – Whether the window which contains the tab is visible or not\n* url `string` – A URL currently opened by the tab\n* title `string` – The tab title\n* active `boolean` – Whether the tab is currently selected or not. Each window has one active tab.\n* loading `boolean` - Whether the tab is loading or not\n\nIt will be rejected when Chrome is not running.\n\n### option.app\n\nType: `string` (either `'canary'` or `'chromium'`)\n\nInstead of Chrome (default), refer to [Chrome Canary](https://www.google.com/chrome/canary/) or [Chromium](https://www.chromium.org/Home).\n\n```javascript\n// When Chrome is not running but Chrome Canary is running\n\n(async () =\u003e {\n  try {\n    await getChromeTabs();\n  } catch (err) {\n    err.message; //=\u003e 'Tried to get tabs of Chrome, but Chrome is currently not running.'\n  }\n\n  await getChromeTabs({app: 'canary'}); //=\u003e [{windowIndex: 0, windowVisible: true, ...}, ...]\n})();\n\n```\n\n## License\n\n[ISC License](./LICENSE) © 2018 - 2019 Shinnosuke Watanabe\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshinnn%2Fget-chrome-tabs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshinnn%2Fget-chrome-tabs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshinnn%2Fget-chrome-tabs/lists"}