Add an item to group the active tab in a new group. (#592)

* Add an item to group the active tab in a new group.

* Text update

---------

Co-authored-by: rebloor <git@sherpa.co.nz>
This commit is contained in:
steven-gardiner
2025-08-06 03:53:42 -04:00
committed by GitHub
parent 386f262076
commit c684711f6b
2 changed files with 7 additions and 0 deletions

View File

@@ -25,6 +25,7 @@
<a href="#" id="tabs-create">Create a tab</a><br>
<a href="#" id="tabs-remove">Remove active tab</a><br>
<a href="#" id="tabs-group">Add active tab to a new group</a><br>
<div class="panel-section-separator"></div>

View File

@@ -98,6 +98,12 @@ document.addEventListener("click", (e) => {
});
}
else if (e.target.id === "tabs-group") {
callOnActiveTab((tab) => {
browser.tabs.group({ tabIds: [tab.id] });
});
}
else if (e.target.id === "tabs-create") {
browser.tabs.create({url: "https://developer.mozilla.org/en-US/Add-ons/WebExtensions"});
}