add save rule button

This commit is contained in:
Gabe Yuan
2023-09-10 12:35:03 +08:00
parent 26f213cad2
commit 3a59a127d1
4 changed files with 61 additions and 4 deletions

View File

@@ -19,3 +19,12 @@ export const sendTabMsg = async (action, args) => {
const tabs = await browser.tabs.query({ active: true, currentWindow: true });
return browser.tabs.sendMessage(tabs[0].id, { action, args });
};
/**
* 获取当前tab信息
* @returns
*/
export const getTabInfo = async () => {
const tabs = await browser.tabs.query({ active: true, currentWindow: true });
return tabs[0];
};