mirror of
https://github.com/XFox111/TabsAsideExtension.git
synced 2026-04-22 07:58:01 +03:00
9 lines
348 B
TypeScript
9 lines
348 B
TypeScript
import { TabItem } from "@/models/CollectionModels";
|
|
import { Tabs } from "wxt/browser";
|
|
|
|
export default async function getSelectedTabs(): Promise<TabItem[]>
|
|
{
|
|
const tabs: Tabs.Tab[] = await browser.tabs.query({ currentWindow: true, highlighted: true });
|
|
return tabs.filter(i => i.url).map(i => ({ type: "tab", url: i.url!, title: i.title }));
|
|
}
|