4213e70697
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
29 lines
966 B
TypeScript
29 lines
966 B
TypeScript
import '../.wxt/types/imports.d.ts';
|
|
import { browser } from 'wxt/browser';
|
|
|
|
export default defineContentScript({
|
|
// matches: ['*://*.google.com/*'],
|
|
matches: ['<all_urls>'],
|
|
runAt: 'document_start',
|
|
main() {
|
|
console.log('Content script loaded successfully', { id: browser.runtime.id });
|
|
|
|
chrome.runtime.onMessage.addListener((message, _sender, sendResponse) => {
|
|
if (message.type === 'START_RECORD') {
|
|
// startRecord();
|
|
console.log('Start recording command received in content script');
|
|
sendResponse({ status: 'Recording started' });
|
|
} else if (message.type === 'STOP_RECORD') {
|
|
// stopRecord();
|
|
console.log('Stop recording command received in content script');
|
|
sendResponse({ status: 'Recording stopped' });
|
|
} else {
|
|
console.log('Unknown command received in content script');
|
|
sendResponse({ status: 'Unknown command' });
|
|
}
|
|
|
|
return true;
|
|
});
|
|
},
|
|
});
|