summaryrefslogtreecommitdiff
path: root/source/helpers
diff options
context:
space:
mode:
Diffstat (limited to 'source/helpers')
-rw-r--r--source/helpers/open-tabs.ts10
1 files changed, 9 insertions, 1 deletions
diff --git a/source/helpers/open-tabs.ts b/source/helpers/open-tabs.ts
index 86b44884..78619cdf 100644
--- a/source/helpers/open-tabs.ts
+++ b/source/helpers/open-tabs.ts
@@ -1,11 +1,19 @@
+import showToast from '../github-helpers/toast.js';
+import pluralize from '../helpers/pluralize.js';
+
export default async function openTabs(urls: string[]): Promise<boolean> {
if (urls.length >= 10 && !confirm(`This will open ${urls.length} new tabs. Continue?`)) {
return false;
}
- await browser.runtime.sendMessage({
+ const response = browser.runtime.sendMessage({
openUrls: urls,
});
+ await showToast(response, {
+ message: 'Opening…',
+ doneMessage: pluralize(urls.length, '$$ tab') + ' opened',
+ });
+
return true;
}