MCPcopy Index your code
hub / github.com/refined-github/refined-github / openTabs

Function openTabs

source/helpers/open-tabs.ts:6–21  ·  view source on GitHub ↗
(urls: string[])

Source from the content-addressed store, hash-verified

4import pluralize from './pluralize.js';
5
6export 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}

Callers 2

onButtonClickFunction · 0.85
openNotificationsFunction · 0.85

Calls 2

showToastFunction · 0.85
pluralizeFunction · 0.85

Tested by

no test coverage detected