feat: update package.json to remove lint-staged, add eslint configuration and dependencies
feat: add state management for recording in RecordeReplayPage component refactor: remove bridge and storage services as they are no longer needed chore: update tsconfig.json for improved type checking and module resolution fix: update downloadHtml function to use eventWithTime type and improve formatting fix: add error logging in formatWithZone function for better debugging
This commit is contained in:
+17
-14
@@ -1,3 +1,6 @@
|
||||
import '../.wxt/types/imports.d.ts';
|
||||
import { browser } from 'wxt/browser';
|
||||
|
||||
export default defineBackground(() => {
|
||||
console.log('Hello background!', { id: browser.runtime.id });
|
||||
|
||||
@@ -48,18 +51,18 @@ export default defineBackground(() => {
|
||||
return true;
|
||||
});
|
||||
|
||||
async function sendToActiveTab(message: {
|
||||
type: string;
|
||||
data?: any;
|
||||
activeTabId?: number;
|
||||
[key: string]: any;
|
||||
}) {
|
||||
let activeTabs = await browser.tabs.query({
|
||||
active: true,
|
||||
currentWindow: true,
|
||||
});
|
||||
let activeTab = activeTabs[0];
|
||||
const sendTo = message.activeTabId || activeTab.id;
|
||||
await browser.tabs.sendMessage(sendTo!, message);
|
||||
}
|
||||
// async function _sendToActiveTab(message: {
|
||||
// type: string;
|
||||
// data?: unknown;
|
||||
// activeTabId?: number;
|
||||
// [key: string]: unknown;
|
||||
// }) {
|
||||
// const activeTabs = await browser.tabs.query({
|
||||
// active: true,
|
||||
// currentWindow: true,
|
||||
// });
|
||||
// const activeTab = activeTabs[0];
|
||||
// const sendTo = message.activeTabId || activeTab.id;
|
||||
// await browser.tabs.sendMessage(sendTo!, message);
|
||||
// }
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user