We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent edc7b84 commit ddafdd4Copy full SHA for ddafdd4
src/compositions/current-tab.ts
@@ -0,0 +1,8 @@
1
+import Browser from 'webextension-polyfill';
2
+
3
+export async function getCurrentTab(){
4
+ const tabs = await Browser.tabs.query({ active: true, currentWindow: true });
5
+ // since only one tab should be active and in the current window at once
6
+ // the return variable should only have one entry
7
+ return tabs[0];
8
+}
0 commit comments