mirror of
https://github.com/GoogleChrome/chrome-extensions-samples.git
synced 2026-03-26 13:19:49 +07:00
@@ -46,6 +46,8 @@ document.querySelector('ul').append(...elements);
|
||||
const button = document.querySelector('button');
|
||||
button.addEventListener('click', async () => {
|
||||
const tabIds = tabs.map(({ id }) => id);
|
||||
const group = await chrome.tabs.group({ tabIds });
|
||||
await chrome.tabGroups.update(group, { title: 'DOCS' });
|
||||
if (tabIds.length) {
|
||||
const group = await chrome.tabs.group({ tabIds });
|
||||
await chrome.tabGroups.update(group, { title: 'DOCS' });
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user