Some checks failed
Tests / Tests (push) Has been cancelled
ESLint Check / ESLint Check and Report Upload (push) Has been cancelled
Prettier Check / Format Check (push) Has been cancelled
Prettier Check / Format Code (push) Has been cancelled
ESLint Check / Build Base for Bundle Size Comparison (push) Has been cancelled
- docs/integration/superrpa-integration.zh_CN.md: complete integration guide - rrweb-simple-ext/: minimal Chrome extension for page recording - replay.html: standalone drag-and-drop replay viewer - CLAUDE.md: project instructions Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
31 lines
669 B
JavaScript
31 lines
669 B
JavaScript
// inject.js - runs in page context, auto-starts recording
|
|
(function() {
|
|
'use strict';
|
|
|
|
let stopFn = null;
|
|
|
|
// Auto-start recording
|
|
stopFn = rrwebRecord.record({
|
|
emit: function(event) {
|
|
window.postMessage({
|
|
__rrweb_action: 'event',
|
|
__rrweb_data: event
|
|
}, '*');
|
|
},
|
|
recordCrossOriginIframes: true
|
|
});
|
|
|
|
// Listen for stop command
|
|
window.addEventListener('message', function(event) {
|
|
if (event.source !== window) return;
|
|
if (event.data && event.data.__rrweb_action === 'stop') {
|
|
if (stopFn) {
|
|
stopFn();
|
|
stopFn = null;
|
|
}
|
|
}
|
|
});
|
|
|
|
console.log('[rrweb] Recording started');
|
|
})();
|