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:
雨霖铃
2026-01-31 18:00:01 +08:00
parent 88a612f9cf
commit 4213e70697
18 changed files with 3437 additions and 135 deletions
+17 -14
View File
@@ -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);
// }
});
+3 -2
View File
@@ -1,4 +1,5 @@
// import { useRecorder } from '../hooks/useRecorder';
import '../.wxt/types/imports.d.ts';
import { browser } from 'wxt/browser';
export default defineContentScript({
// matches: ['*://*.google.com/*'],
@@ -7,7 +8,7 @@ export default defineContentScript({
main() {
console.log('Content script loaded successfully', { id: browser.runtime.id });
chrome.runtime.onMessage.addListener((message, sender, sendResponse) => {
chrome.runtime.onMessage.addListener((message, _sender, sendResponse) => {
if (message.type === 'START_RECORD') {
// startRecord();
console.log('Start recording command received in content script');