(urls: string[])
| 4 | import pluralize from './pluralize.js'; |
| 5 | |
| 6 | export default async function openTabs(urls: string[]): Promise<boolean> { |
| 7 | if (urls.length >= 10 && !confirm(`This will open ${urls.length} new tabs. Continue?`)) { |
| 8 | return false; |
| 9 | } |
| 10 | |
| 11 | const response = messageRuntime({ |
| 12 | openUrls: urls, |
| 13 | }); |
| 14 | |
| 15 | await showToast(response, { |
| 16 | message: 'Opening…', |
| 17 | doneMessage: pluralize(urls.length, '$$ tab') + ' opened', |
| 18 | }); |
| 19 | |
| 20 | return true; |
| 21 | } |
no test coverage detected